5 Replies Latest reply on Sep 26, 2013 3:33 PM by DavidHawkins

    Import Records with script in FMGo

    DavidHawkins

      Title

      Import Records with script in FMGo

      Post

           Hi,

           I am trying to import records between 2 fmp12 files on FileMaker Go. I have had this work before on a simple test database with 2 records but now when I try to impliment it on our main database it just wont work.

            

           If anyone can shed some light on whats going on that would be great.

            

           Thanks

        • 1. Re: Import Records with script in FMGo
          schamblee

               You will have to give more information.  Is any data being imported? If so, what data is missing?  Are you getting any error messages?   Importing in Go should the same way as it does in Pro.   Does your import script work in pro?

          • 2. Re: Import Records with script in FMGo
            philmodjunk

                 Are you using a file path variable to specify the location of the source file? Or have you set up a table occurrence in the target file that refers to the source table in the source file? (Both methods can work, but I'd go with the second option if at all possible.)

            • 3. Re: Import Records with script in FMGo
              DavidHawkins

                   Hi,

                   I have attached an image of the script, it all works perfectly on my Desktop but when it runs in FMGo nothing happens, it just finishes the script (I get my message it's done) and no records are imported at all.

                   The file it's importing from is a file on the iPad in FMGo called Backup.fmp12, so in the data source part of the import script I simply put:

                   file:Backup.fmp12

                   Cheers

              • 4. Re: Import Records with script in FMGo
                TSGal

                     David Hawkins:

                     Thank you for your posts.

                     Try specifying the file on the device.  For instance:

                     Set Variable [ $file ; "file:" & Get ( DocumentsPath) & "Backup.fmp12" ]
                     Import Records [ No dialog ; $file ; Add New Records ]

                     Put the above two steps into a separate script and try running it by itself.  If this works, then call this script from your main script.

                     Keep us updated with any progress.

                     TSGal
                     FileMaker, Inc.

                • 5. Re: Import Records with script in FMGo
                  DavidHawkins

                       I am not sure what the exact issue was but it is working now. The script was being called during the initial start up script so I out a delay timer on it so it waited until that initial script had finished before it tried to import.

                       Doing this seems to have allowed it to work, so I am going with it.

                       Thanks everyone for the help.