The main factor in determining if all records in a table are imported is if the source FileMaker file is open or closed when you start the import.
Importing from a closed FileMaker file will result in importing all records from the source table.
If the source FileMaker file is open, then the current Found Set of the most recently visited layout for that table will be imported. I think this is the recipe.
When in doubt, close the source FileMaker file before doing the import.
Closing a file may not always be possible, for example if any relation to this file exists.
To make sure all records are being imported go to a window of the file to import andperorm a script that contains "Show all records", otherwise just the found set will be imported.
It also matters whether the files in question are hosted or being used in local/single-user mode. When hosted, you will generally get all records from the source, sometimes even if the file is open in another window with a less-than-all found set.
In single-user mode with the files on the local disk, the latest found set may affect the import. I think this was fixed after the FP7 file format so that importing from a closed file will import all, but I recall with some older versions it only imported the found set which was active when it had been last closed if being used as a local file. I started building a Show All records into the onFileClosing script so that the files would always open/import the full record set.
If you want to import only a found set in a Hosted environment, it is sometimes easier to export the found set to a local FMP file, and then run your import from that local file.
I tend not to assume - ever - that I have the right found set from opening a file cold. I open the file and verify it, either manually or via running a script in that file.
But that's me ... paranoid, and proud of it.
Belt and Suspenders, again.
I agree, been surprised too many times by unexpected found sets to assume such can be scripted without performing some processes in both files before the import.
There's one other benefit I've found, too, which crops up if you have multiple imports to do from the same source file: If you open it first and leave it open, you only have to authenticate once.
Paranoid ... and lazy.