AnsweredAssumed Answered

Script error: "No fields were selected for export"

Question asked by on Mar 7, 2017
Latest reply on Mar 7, 2017 by philmodjunk

I'm new to FileMaker scripting and am having a problem. I've scripted up a solution to copy related records from a table, export them, then import them (while changing the foreign key field). It seems pretty simple in concept, and I think my syntax should all work, but it doesn't. I've whittled the script down to just the bare essentials of finding the records and exporting them, but it still doesn't work. Here's the "bones" of the script:


Set Variable [ $id ; Value: Inventory::__pkItemID ]

Go to Layout [ "Transaction List" (Transactions) ]

Enter Find Mode [ Pause: Off ]

Set Field [ Transactions:: _fkItemID ; $id ]

Perform Find [ ]

Export Records [ With dialog: Off ; "" ]


The script switches layouts and successfully finds the correct records associated with the correct _fkItemID, but exporting always fails with an error: "No fields were selected for export". It's my understanding that Perform Find will automatically select everything that it finds, correct? I also thought that perhaps it was a problem with not already existing or the file path not being set, so I added code to do that, but still get the same error.


What am I doing wrong, here?