6 Replies Latest reply on Jan 24, 2014 11:32 AM by peteolandt

    Problems Setting Up Go13 Import Records script

    peteolandt

      Title

      Problems Setting Up Go13 Import Records script

      Post

           Hi,

           I'm a new user to this forum and Pro 13 and Go 13.  So I feel like this should work but I'm missing some key fact in my newness.  

      The equipment:  Macbook Pro running OSX 10.9.1 and trial version of FM Pro 13.  And an iPhone 4s running iOS 7.0.4 and FM Go 13.

      The situation:  I need to set up iPads for our crews to go out into the field and record info.  They will be out of data range much of the time, so I've figured out I need to transfer the target databases to the iPads (I'm testing on an iphone4S) and then use Import Records script once they are on our LAN to get the data into the main FM file.

      The setup:  Following the Filemaker Go 13 Development Guide (Top of page 9), I have created the following test file:

           TestMSSTarget11.fmp12 with the script: Import Records ["TestMSSSource.fmp12"; Update existing; Mac Roman]

           The "TestMSSSource.fmp12" represents "fmnet:/192.168.1.9/TestMSSSource.fmp12"

           TestMSSSource.fmp12 has been created on the macbook. All the fields line up 1-1 with TestMSSTarget11. 

           I then transferred TestMSSTarget11 over to the iPhone.

           I have double checked that this is the local IP for the FM Pro computer.  In addition, I can get the FM Go iPhone to open up FM files on this same computer.  So I know they can talk to each other.

      The Problem: When I'm in FM Go and use the script, absolutely nothing that I can see happens.  I get no error messages.  There is no change in the Source file or Target file.  I've gotten the barcode script to work so it seems like its either something with my script syntax specific to Import Records, or something about the actual connection (permissions, ports, ...)

           So what am I missing?

           Thanks in advance. 

        • 1. Re: Problems Setting Up Go13 Import Records script
          AppGuy

                              If you open both files on your mac and run the script does it work?

          • 2. Re: Problems Setting Up Go13 Import Records script
            peteolandt

                 I've tried every combination of files being open or closed and nothing seems to change.

            • 3. Re: Problems Setting Up Go13 Import Records script
              AppGuy

                   Peter-

                    

                   What I am asking is if you put both files.. target and source on your mac.. what are the results.. (not on fm go) If you have fm pro advanced you can run the script debugger and it will show you what is happening..

              • 4. Re: Problems Setting Up Go13 Import Records script
                peteolandt

                     We're starting to get somewhere!  I run the script in TestMSSTarget11.fmp12 on the macbook and I get back the following error:

                      

                There are less records in the data source than in the target table.  Not all records were updated.  

                I click okay.  Then:

                Import Summary:

                Total records added/updated: 1

                Total records skipped due to errors: 0 

                Total fields skipped due to errors: 0 

                Table created: <none>

                      

                     The one record in source didn't change.  The same record in Target11 was modified to match the source (I left 1 field different).  

                     When I do this from the iPhone the record ISN'T changed.

                      

                      

                     And thanks for helping me!  I'm appreciating it.

                      

                      

                • 5. Re: Problems Setting Up Go13 Import Records script
                  peteolandt

                       Another major revelation.  I was getting confused by the terminology in the Documentation.  The documentation uses remote source for the FM Pro computer and local database for the iPhone.  I got in my head that the FM Pro computer should be the local, and the iPhone, being a mobile device, should be the remote.  But the documentation is for FM Go, and hence written from the viewpoint of the iPhone.  

                       That said, I still need the ability to pull info into the iPhone as well.  Even though I had things backward, I had left differences in the Source file so in the event of me getting things backwards I should still see a difference.

                       I'm in the process of setting up a different test based on Example 2 on Page 9 of the FM Go developers documentation.  Once I finish that I will report back.

                  • 6. Re: Problems Setting Up Go13 Import Records script
                    peteolandt

                         So using example 2 on Page 9 of the documentation, I have successfully transferred data from the iPhone to the Macbook.  This solves the first half of my situation, moving my data from iPhone to computer.  It doesn't solve my need to also push data out to the iPhone at the start of the day.  So I'm back to testing Example 1.