Script Steps Reference
Table Of Contents
- Contents
- About script steps
- Script steps reference (alphabetical list)
- Control script steps
- Perform Script
- Pause/Resume Script
- Exit Script
- Halt Script
- If
- Else If
- Else
- End If
- Loop
- Exit Loop If
- End Loop
- Allow User Abort
- Set Error Capture
- Set Variable
- Install OnTimer Script
- Navigation script steps
- Go to Layout
- Go to Record/Request/Page
- Go to Related Record
- Go to Portal Row
- Go to Object
- Go to Field
- Go to Next Field
- Go to Previous Field
- Enter Browse Mode
- Enter Find Mode
- Enter Preview Mode
- Editing script steps
- Fields script steps
- Set Field
- Set Field By Name
- Set Next Serial Value
- Insert Text
- Insert Calculated Result
- Insert From Index
- Insert From Last Visited
- Insert Current Date
- Insert Current Time
- Insert Current User Name
- Insert Picture
- Insert QuickTime
- Insert Object (Windows)
- Insert File
- Update Link (Windows)
- Replace Field Contents
- Relookup Field Contents
- Export Field Contents
- Records script steps
- New Record/Request
- Duplicate Record/Request
- Delete Record/Request
- Delete Portal Row
- Delete All Records
- Open Record/Request
- Revert Record/Request
- Commit Records/Requests
- Copy Record/Request
- Copy All Records/Requests
- Import Records
- Export Records
- Save Records As Excel
- Save Records As PDF
- Save Records As Snapshot Link
- Found Sets script steps
- Windows script steps
- Files script steps
- Accounts script steps
- Spelling script steps
- Open Menu Item script steps
- Miscellaneous script steps
FILEMAKER SCRIPT STEPS REFERENCE 26
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.
Format
Set Variable [<variable name> {[<repetition number>]}; Value:<value or
formula>]
Options
Click Specify to set the variable options:
• Name is the name of the variable you want to create. Prefix the name with $ for a local
variable or $$ for a global variable. If no prefix is added, $ is automatically added to the
beginning of the name.
• Value is the value the variable is set to. You can enter text or specify a calculation.
• Repetition is the repetition (index) number of the variable you want to create. If no
repetition is specified, the default is 1.