Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER SCRIPT STEPS REFERENCE 17
Description
While pressing Esc will also halt a script, Halt Script is useful if you are also using the Allow User
Abort script step to disable the Esc key. Halt Script stops the script when Allow User Abort is set to
Off.
Examples
You can use the Halt Script script step with the Show Custom Dialog script step to present a user
with options. If the user clicks Cancel, the script stops; otherwise, the script continues.
Show Custom Dialog ["Delete all records?"]
If [Get (LastMessageChoice) = 2]
Halt Script
End If
Delete All Records [No Dialog]
If
Purpose
Evaluates a Boolean calculation and performs a conditional action based on that evaluation.
Format
If [<Boolean calculation>]
Options
Click Specify to define the Boolean calculation. In the Specify Calculation dialog box, type the
calculation you want evaluated, or use the field list (on the left) and the functions list (on the right)
with the mathematical and text operators to build the calculation.
Compatibility
This script step is also supported in web publishing and in a FileMaker Server scheduled script.
Description
If the calculation result is any number except zero, the calculation evaluates to True and the
subsequent script steps are executed. If the calculation result is zero, no data, or does not resolve
into a number, then the calculation evaluates to False and the subsequent script steps are not
executed.
Every If step must have a corresponding End If script step somewhere after the If step and at the
same indentation. Whenever you use an If script step, the Manage Scripts feature automatically
enters an End If step.
You can also add additional conditions by using the Else If script step and Else script step.
Note If you do not specify a calculation or if the calculation is unsuccessful, it will evaluate as False.
Use the
Get(LastError) function to capture these errors.