Get(LastError)Returns a number representing the error, if any, in the execution of the most recently executed script step.
• OS X: In FileMaker Pro, if an error occurs while performing an AppleScript from the Manage Scripts feature, the AppleScript error code will be returned.
• For ODBC imports and Execute SQL script steps, if an error occurs while performing a SQL query, returns FileMaker error 1408. For detailed information about the error, use the Get(LastODBCError) function. If there is no information about the error, returns FileMaker error 1409.
• Some script triggers allow for the activating command or event to be canceled if the script executed by the script trigger returns a False value. When a command or event is canceled this way, the error code is set to 20.
• Tip To create a script that responds to errors without displaying alerts, use this function with the Set Error Capture script step with the On option.Returns 0 when the most recent script step executed successfully.