Open the hosted copy of the file.
Open this script in Manage | scripts
Edit the import records script by re-selecting the file and table from which you want to import the data. When you select the file, use the Open Remote option so that this reference correctly accesses the hosted copy of the file.
This works fine, except that I want to import data from a found set of records. (My script finds the set and later uses Import Records to bring the desired data from this found set into the other table in the file.) When I follow your suggestion, the script imports the data from a different instance of the file on the server and inserts data from all records in the hosted file—not just records that are in the found set in the file instance I have open. Is there a work-around for this?
"the script imports the data from a different instance of the file on the server"
What does this mean exactly?
If the client has both files open at the time of the import, Import records imports the found set. If the client does not have the source file open, import records imports all records from the specified table. Thus, have your script open the file using Open File or Perform script [specify a script in the source file here] to open that file before importing from it.
Like Rick, I really don't know what you mean by a "different instance of the file". One should not have multiple copies of the same file open on the server, the resulting confusion could be disastrous. If you mean a different instance of a particular table, each such instance, also called a table occurrence, has it's own unique name in Manage | Database | Relationships. You can thus set up the Import Records step to import from a specific table occurrence by selecting that specific table occurrence by name from the source table drop down list.