Using Open File script step with a missing data source returns error 0

Discussion created by james.currie on Dec 19, 2016
Latest reply on Dec 19, 2016 by tsplatypus

Product and version

FileMaker Pro Advanced


OS and version

macOS Sierra and Windows 7



MacBook Pro



I have a file, let's call this FileA. FileA contains a script which opens a file (FileB) using the Open File script step


How to replicate

Create two files (FileA and FileB), create a data source in FileA which points to FileB in File > Manage > External Data Sources.

Create a script in FileA (ScriptA) as follows:

Set Error Capture [On]

Open File [ FileB ]

Set Variable [ $Error ; Value: Get ( LastError ) ]

Set Error Capture [Off]

Show Custom Dialog [ $Error ]


Run ScriptA, the file is opened and the custom dialog appears showing the number 0


In FileA open File > Manage > External Data Sources and delete the reference to FileB


In ScriptA the Open File step will now display as

Open File [ <unknown> ]


Run ScriptA, the file will not open and a custom dialog appears showing the number 0. I expected the error in the custom dialog to be something other than 0.


I've attached a screenshot showing this error on a test file.