7 Replies Latest reply on Mar 6, 2013 7:21 AM by atalanta

    Import from local file on FMGo on iPad2

    fred@kca-inc.com

      Title

      Import from local file on FMGo on iPad2

      Post

      I have a curious issue.  I have an app developed in FMP11. I use several "imports" from a different table in the same file to create temp table records.  If I run this app in FileMaker Go by emailing the FP7 file to myself, it doesn't appear that the imports work.  If I run the same file on FM Go using FileMaker Sharing from my laptop, it works fine.  I'm assuming that FM Go can't find the local file to import from when it's resident on the iPad.  Is there way to tell the import to use the same file without specifying the file name?  Has anyone seen this behaviour?  Any suggestions would be appreciated.

      Fred

        • 1. Re: Import from local file on FMGo on iPad2
          TSGal

          Fred Erickson:

          Thank you for your post.

          Since this works with a hosted file, the path referenced is on the Mac.  Therefore, you need to make reference to the file on the iPad.  Here is a simple script to grab the information from the same table on the iPad.

          Set Variable [ $file ; Value: "file:" & Get ( FileName ) & ".fp7" ]
          Import Records [ No dialog ; "$file" ; Add; Mac Roman ]

          Let me know if you need additional clarification.

          TSGal
          FileMaker, Inc.

          • 2. Re: Import from local file on FMGo on iPad2
            fred@kca-inc.com

             That worked.  I set a global variable at login with Get (FilePath) and use it in the Import script step and the imports all seem to work on FM Pro and FM Go now.  Thanks for sharing!

            Fred

            • 3. Re: Import from local file on FMGo on iPad2
              atalanta

              TSGal,

               

              I have the same problem. In my import script step I have the file path as file:Client.fp7 and $$path where $$path is set to be Get(DocumentsPath)  & "Client.fp7"

              When I'm testing and developing in FM Pro, it works just fine. When I move it to the FM Go, it will open the Host.fp7 file but when I go to import to Host.fp7 from Client.fp7 I get an 802 error (unable to open file) even though both files are open on my touch.

              Is there more I need to do to get the path to the client on the FM Go machine to work?

               

              Thanks

              • 4. Re: Import from local file on FMGo on iPad2
                TSGal

                Atalanta:

                Thank you for your post.

                I've tried a few things here, and here is the simplest method I found.

                In my Host.fp7 file, my script reads as follows:

                Set Variable [ $file ; "file:" & <filename.fp7> ]
                Import Rcords [ No dialog ; "$file" ; Add: Mac Roman ]

                I simplified it further by omitting the Set Variable scritp step and just putting the entire name in Specify data source entry.  There was no need for the Get(DocumentsPath) since FileMaker Go would already know to look there.

                Let me know if you continue to run into difficulty.

                TSGal
                FileMaker, Inc.

                • 5. Re: Import from local file on FMGo on iPad2
                  atalanta

                  I had already tried that, TSGal.

                  Another developer suggested using the data separation method which worked.

                  Oh, and one sure way to get your scripts to not work: dialogs. You'd better have error capture ON and all the options to PERFORM WITHOUT DIALOG checked. I forget the last one big time until I see an error code 3.

                  • 6. Re: Import from local file on FMGo on iPad2
                    ScottBleackley

                          Atalanta can you provide an example, explain or reference the data separation method which worked?

                         I gather from your post that FM Go does not provide any diolog support for imports, is this correct?
                         If that is the case then does import add records on the basis of name matching from all the tables in the target file?

                         I have been unable to locate any good documentation on FM Go local to local import
                         do you know of any?

                         Any thoughts or suggestions are most welcome,

                         Thank you

                    • 7. Re: Import from local file on FMGo on iPad2
                      atalanta

                           What I did was I added the host's tables to the relationship graph and named them like Jobs Served to differentiate it from Jobs in the local file.

                           I then added layouts based on the Served tables.

                           The import was done between Jobs and Jobs Served locally rather than doing the import between the two files.