Use an Open File script step to open the file before you begin the imports.
Import Records will open the requested file, but will close it again immediately after the import is complete. By opening the file ahead of time, you avoid that behavior.
Thanks, Mike! That is exactly what I needed.
But be careful when you import from a file that is already open, you import the specified table occurence's current found set. This might not be all records in the table.
You may need to perform a script in the old copy that does a show all records for each table before the records are imported.
Yes. The same caution applies when opening a file that’s not hosted on FileMaker Server. The found set may be retained in a locally-held file, so you’ll need to do what Phil is recommending.
It's been my experience that if the file is not open, you get all records--even from a local copy, but I haven't checked into that lately--since we are still bedeviled by a catch 22 here:
We can leave the files closed to ensure that all records are imported, but then we have to enter credentials for each import.
Or we can open the files, but now have to perform a script in the source file to ensure that all records are imported.
When it would really be nice to be able to do the first without having to enter credentials each time. (any other file to file reference auto-enters the first file's credentials to open the second, why not also for import records?)