Go to Contents
Previous
Page
Next
Page
Contents > Functions reference (alphabetical list) > Get functions > Get(LastError) function

Get(LastError) function
Format

Get(LastError)
Parameter
None
Data type returned
number
Description
Returns a number representing the error, if any, in the execution of the most recently executed script step. Use this function to detect and control the outcome of errors. See FileMaker Pro error codes.
Notes
Mac OS: In FileMaker Pro, if an error occurs while performing an AppleScript from ScriptMaker™, 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 a string that shows the ODBC error state (SQLSTATE).
For working with ODBC data sources in the relationships graph, returns FileMaker error 1408.
See Solving calculations on a host machine for information about running scripts in client/server and peer-to-peer environments.
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.
Examples
Returns 0 when the most recent script step executed successfully.
Returns 401 when no records are found after the Perform Find script step has been executed.
Related topics
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas

Contents > Functions reference (alphabetical list) > Get functions > Get(LastError) function
Previous
Page
Next
Page