7 Replies Latest reply on Jun 6, 2014 3:07 PM by rouelf_1

    Updating a file

    appt

      Title

      Updating a file

      Post

           I keep seeing mention of the possibility of importing from one filemaker file to another within fm go but don't seem to be able to find out much more. 

           Scenario is I have a file on an ipad which has data in, I update my original to add a new button for whatever reason. I know I could drag the file to my MacBook and import the records but I'd love to be able to put  the new file on the ipad and have the user press a button to transfer the old date to the new version. 

           i think I saw a third party solution for this but it costs and was pretty complex. 

           Even the get (filepath) step gives me a huge ipad file name with loads of random text in it. 

           Any thoughts?

        • 1. Re: Updating a file
          AppGuy

               You would have to do this through scripting...

               you could have a separate database that does the importing and upgrading for you...  You can't do it within your current database because you have to overwrite it..

                 
          1.           Export all your current working database to your migration database..  
          2.      
          3.           Then download a new copy of the database to your iPad... (overwrite the current one)
          4.      
          5.           import the data from your migration database to your new database.. and done..

                

                

               FYI- Gozync does the upgrade process automatically for you...  You would have to do the import/export yet though..  If it is a hosted solution you might want to look into using gozync...  If it is hosted and you use gozync.. that's it.. no importing/exporting..  It's syncing instead.. (not sure if this is an option for you..)

                

                

                

          • 2. Re: Updating a file
            appt

                 Thanks for the reply. Am aware of hosting as a possibility but at the moment that's not the route am using. 

                 Understand the idea you have outlined but can you give me some clues to the scripting in the sense of the file paths which is the bit I can't get my head around. I can do the scripting of import/export just don't know how to reference the files on the ipad. 

            • 3. Re: Updating a file
              AppGuy

                   sure thing...

                   To get the file path.. use this in your script: - Get(FilePath)   - http://www.filemaker.com/help/html/func_ref2.32.28.html   also here  http://www.filemaker.com/help/11/fmp/html/create_db.8.32.html

                   Then set the variable.. with the path... so you can call it later.. 

                   On the iPad it is simply..   file:filename.fmp12

                    

              • 4. Re: Updating a file
                appt

                     Hmmm,

                     using this script

                     Import Records ["PsychTestOriginal.fmp12"; Add; Mac Roman]

                     and attaching to a button does nothing at all on the iPad with 2 files in FM GO, PyschTestOriginal and PsychTestNew

                      

                • 5. Re: Updating a file
                  AppGuy

                       Take a look at page 8 here:  https://fmhelp.filemaker.com/docs/13/en/fmgo13_development.pdf

                       You are missing some of the parameters...   

                  Create an “Import to Remote” script in Target.fmp12. For example:
                  Set Variable[$FilePath;Value:Get(DocumentsPath) & “Source.fmp12”]

                  Import Records[No dialog; “$FilePath”; Add; Mac Roman] where the path to the source file on the device is file:$FilePath 

                                       

                        

                  • 6. Re: Updating a file
                    appt

                         That hasn't worked either I'm afraid. 

                         What does the Get (DocumentsPath) part refer to? Is that the the file that is open (PsychTestNew)? Can I not refer to it by name?

                          

                    • 7. Re: Updating a file
                      rouelf_1

                           Andy, See My post on your post named: FM Go: Local to Local file import