You saw all.
Help may be better to add description "you will receive an error:"
importing records from fmnet:
It is "Note"d as
Any path specified that isn’t a complete path to the file (for example, anything other than
/Macintosh HD/Library/FileMaker Server/Data/Documents/<0 or more directories>/<filename> ) is evaluated as being relative to the temporary path.
then your "file:..." don't work.
Where are you exporting the data too? On FileMaker Server, it has to be in the FileMaker Server folders where FileMaker has permissions to read/write files. I usually create a $Path variable equal to Get ( DocumentsPath ) & "ExportFileName.xlsx" and then use the same $Path to import it if you need. I like to use the TemporaryPath when possible, but sometimes it doesn't work on server and DocumentsPath always does.
We are running a two file MirrorSync setup. The end result is to pull a set of records into the remote file so we can download a populated table instead of an empty clone. The main table the remote user has to see may have 7000+ records in it.
When we run the initial sync on an empty clone, on the local lan it takes several minutes to download the initial record set. When we run it on an iPad connected through our phone carrier it can take 20 minutes or longer.
What this script does is clear out the most of the tables and prep the file for download. It then populates the primary data table with the current record set. The intention is to run this script once a day about 1 AM. When we do this, the initial sync takes about 30 seconds or less.
Both databases are hosted on the server. The big issue is that it appears that a scheduled script can't access another filemaker database. So I can't import the data directly from the source file.
My current work around is to put a table occurrence for the source table in the remote file/database. Show all records and export them to an excel spread sheet with field names. The spread sheet is stored in the temp ( Get(TemporaryPath) ) folder. The server account can read/write to this folder. It is then imported, matching on the primary key, updating existing records and adding new records.
I tried some experimentation with Perform script on server and found that this method has the same problem opening FileMaker databases for data import. If I use Perform script it can open the FileMaker database and import the data from the server.
All thanks for the suggestions. There were helpful.