8 Replies Latest reply on Jun 6, 2014 4:04 PM by appt

    FM Go: Local to Local file import



      FM Go: Local to Local file import


           FM Go: Local to Local file import

           I have read in all the spec's for FM Go that this is possible,
           but there appears to be little if no documentation regarding this important function.

           I need to add records to an existing file on FM Go from another file which also exists on FM Go.
           Both databases have exactly the same format and the new records have unique identifiers.

           This is for a field level collection where one person gathers records collected by others on different iPads.
           The Database file is delivered to the central iPad where, ideally the records are added to a growing collection.

           When I use import records no dialog, on FM Go I get the dialog
           The script step "import records" is not supported on this device."

           So maybe I am missing something really simple here.

           Any references or suggestions are most welcome,

           Thank you

        • 1. Re: FM Go: Local to Local file import

               Scott Bleackley:

               Thank you for your post, and I apologize for the late reply.

               Import Records is supported in FileMaker Go.  Just make sure you are importing from one FileMaker Pro file into another FileMaker Pro file.  Importing from a non-FileMaker Pro database file is not supported.

               If you are still having difficulty, let me know how you have set up the Import Records script step.

               FileMaker, Inc.

          • 2. Re: FM Go: Local to Local file import

                 Yes, thank you TSGal, 

                 I have local to local working nicely.
                 However I do not see how to implement a file selection dialog, like open file
                 but in a way that enables me to use the selected file in several import statements as a target file.

                 I should note that the documentation says that I have to have the imported from file open but
                 it appears to import well even when it is not. on FMGo

                 Any suggestions are most welcome.

            • 3. Re: FM Go: Local to Local file import

                   Scott Bleackley:

                   To implement a file selection dialog, use the script step:

                   Open File [ <unknown> ]

                   When executed in FileMaker Go, it will bring up a File Browser window allowing you to select files on the iOS device, recent files, remote files, and a listing of favorite hosts.

                   Let me know if you need additional clarification.

                   FileMaker, Inc.

              • 4. Re: FM Go: Local to Local file import

                     Thanks TSGal

                     Maybe I am being obtuse or brain dead here but after using

                Open File [ <unknown> ]

                how do I get the name of the file that has been opened?

                     any suggestions are most welcome

                     thank you

                • 5. Re: FM Go: Local to Local file import

                       Scott Bleackley:

                       My apologies.  I read your initial statement "how to implement a file selection dialog, like open file" and took it literally.

                       In FileMaker Go, if you are importing a FileMaker Pro file via Import Records, you must select a specific file.  That is, you cannot bring up a window to select a file.

                       FileMaker, Inc.

                  • 6. Re: FM Go: Local to Local file import

                         Hi Scott, could you please share how you are importing local to local on the iPad as in the script steps required I am having a nightmare trying to get it tow work.

                         2 files



                         Cheers in advance


                    • 7. Re: FM Go: Local to Local file import

                           For Andy Evans, maybe you got your answer, maybe not. This is what I do: 2 Files, one is called Word, the second is called XX_Update.fmpur.


                           1) On iPhone, add new records to the file Word. On the iPad is an identical copy of the file Word without the new records.

                           2) Then from the file Word (On the iPhone) run a script that saves a copy of Word (with new records), with a new name: XX_Update.fmpur at the same location as the file Word.

                           3) Email or transfer the file XX_Update.fmpur to the iPad.

                           4) On the iPad open the file Word, using a button, run the import script below, this updates the file Word in the iPad with the records in XX_Update. Note: In the Import Records script step set the fields import order.

                           5) Delete the files XX_Update (can also be done with a script).

                           Note: This works with FMA 13 on the MAC, and with a runtime file on the MAC and with FM Go. The file XX_Update must always be at the same location as the file (Word) being updated. 

                           Hope this helps,


                      #PURPOSE: imports records from XX_Update file.

                      Perform Script [ “Delete” ]

                      Allow User Abort [ Off ]

                      Set Error Capture [ On ]


                      #Define the $path

                      Set Variable [ $FilePath; Value:Get ( FilePath ) ]

                      Set Variable [ $FilePath; Value:Let ( [

                      Tag = "/";
                                          start = Position ( $FilePath; Tag ; 1 ; 1 ) ;
                                          end = Position ( $FilePath ; Tag ; start ; PatternCount ( $FilePath ; "/" ) )+1 ];
                                          If ( PatternCount ( $FilePath; Tag ) ;
                                          Middle ( $FilePath; start ; end - start ) ;

                      Set Variable [ $Path_Update; Value:$FilePath & "XX_Update.fmpur" ]

                                          # Import records


                      Import Records [ Source: “$Path_Update”; Target: “Word”; Method: Add; Character Set: “UTF-8”; Field Mapping: Source field 1 import to Word::Field_1 Source field 2 import to Word::Field_2 Source field 3 import to Word::Field_3 Name Source field 4 import to Word::Field_4 Source field 5 import to Word::Field_5 ] [ No dialog ]

                      If [ Let ( [
                                          $last_err = Get( LastError )



                      ## record the error

                      Set Variable [ $err_msg; Value:"Import Failed¶
                                          Could not import records from XX_Update¶
                                          due to error #" & $last_err & " = XX_Update.fmpur¶ Is Not At Lcation Of Word" ]

                      Show Custom Dialog [ Title: "Import Failed"; Message: $err_msg; Default Button: “OK”, Commit: “Yes” ]

                      Exit Script [ ]

                      End If

                      Show Custom Dialog [ Title: "Import Update"; Message: "XX_Update.fmpur¶ Has Been Imported From:¶
                                          The Same Location As:¶
                                          Word"; Default Button: “OK”, Commit: “Yes” ]

                      Show All Records
                                          Go to Record/Request/Page
                      [ First ]

                      GotoField[ ] 


                      • 8. Re: FM Go: Local to Local file import

                             Thanks for that. 

                             In the end I got it all working beautifully. When we need to update the software on an iPad we simply send a new empty file to the user with a great big update button.

                             Took me a while to realise that you needed to be on certain layouts that linked to certain tables to allow the import to work but once I had that sorted it was very easy.

                             Once the user presses the update button it does its thing migrating all the data from the previous version and then the button disappears for good.

                             Has worked this week for half a dozen people so I am pretty happy. It doesn't delete the old file but they get given instructions on how to do that manually and I think prefer to keep old file for a short while anyway. Plus they can always drag it off and archive it.

                             My thanks go to TSGal for her help and convincing me it was possible, I just needed to be better at FM.