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.
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!
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?
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.
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.
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,
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.