Import Records fails with error 100 File is Missing

I'm importing from one table in the database to another table in the database. The workflow is:

    • import messy data to temp table
    • process data
    • import data to cleanData table

At step three, I'm importing from temp table to table. In the import records step the file reference is:

file:fileName.fmp12

Of course, it works when I run it manually from FMP but it doesn't work when I run on the server via a script schedule.

HostApplicationVersion = "Server 19.0.1" ;
Application Version: Pro 19.2.1

Importing from one table in a file, to another table in the same file, as far as I recall, is not supported on FileMaker Server.

With that said, importing into a temp table in a different file then importing the transformed/cleaned data into the actual table may work from a different file.

1 Like

I do not think importing from a .fmp12 file is supported server-side. If you export the exact same data as a .mer file and target that for your import, it should work server-side.

I believe importing from a table into the same table is also something that is problematic server-side, but works on FMP.

1 Like

Since @jormond and @Bobino don't seem certain, let me chime in as I've butted heads with this limitation in the past.

Server side scripts can not import from a .fmp12 data source. If you want a server side script to import from one FileMaker table to another, within the same file or between two files, you will need to export the data to a file format compatible with server side import.

This will be OK for all data types… except container data. You will need to export and insert container data individually.

Then again… there is always the robot route. Old fashion, but it works.

Hope this helps.

2 Likes

I know that I've implemented table to table imports previously without bumping into this limitation. They must have been (a) manually triggered or (b) data separation/multi-file.

I'm so surprised that server sides scripts cannot import from fmp12. I'm going to have to follow this up but for now I'll modify the scripts to be an export/import.

thanks

Don't get me wrong. Table to table works… just not server side.

Yes, that was clear.

Whenever I've been in similar situations, it has been my inclination to write out via relationship the corrected data from the holding-tank table to the final-destination table. That accomplishes the same overall thing as what you're doing, which is correcting the data in the holding-tank table and then importing that into the final-destination table.

That is certainly an option. My preference for using import is simply that importing can be a bit faster than walking through the record set and imports are usually reliable. However, walking through the record set gives you much more control over the transfer.

After modifying the script to output the cleaned data to a CSV file and re-importing, the script is working without errors. Thanks.

3 Likes