Script Steps Reference

Table Of Contents
FILEMAKER SCRIPT STEPS REFERENCE 28
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to handle errors in a manner consistent with the functions the script performs. By
using the Get(LastError) function immediately after a script step, you can verify that the step was
performed properly.
By using the Get (LastError) function with the control script steps, you can make sure your script
performs correctly. When you decide to suppress alerts, it is important that you anticipate as many
problems as possible and include clear instructions for what to do when an error condition is
encountered.
Note Use Get (LastError) immediately after the script step you intend to test; a successful
intervening step may clear the error code you were intending to capture.
Examples
Set Error Capture [On]
Perform Find [Restore]
Set Field [Table1::gErrorCaptureField; Get (LastError)]
#The field Table1::gErrorCaptureField is a global text field
If[Table1::gErrorCaptureField <> 0]
Show Custom Dialog ["Couldn't find the record..."]
End If
Set Error Capture [Off]
Related topics
Script steps reference (alphabetical list)
Contents
Set Variable
Purpose
Sets a local or global variable to a specified value.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server scheduled script Yes
FileMaker Go Yes
Custom Web Publishing Yes
Instant Web Publishing Yes
Runtime solution Yes