Database Reference
In-Depth Information
FileMaker adds two new lines—
If
and
End If
—to your script.
3.
Click the Specify button. From the View pop-up menu, choose “Get functions.”
The function list now shows all the
Get()
functions.
4.
Find
Get(Script Parameter)
in the list and then add it to your calculation
.
The
Get(ScriptParameter)
function returns the parameter value that was specified
when this script was called. If the parameter was a calculation, it returns the
result
of
the calculation, which is now in the Calculation box.
5.
In the Calculation box, after
Get(ScriptParameter)
,
type
= “Last Name”
and
then click OK
.
You're back in the Edit Script window, where the If step shows your calculation. Your
calculation should look like this:
Get(ScriptParameter) = “Last Name”
. Its result
is True if the parameter sent to this script is “Last Name,” and False otherwise.
6.
Add the
Sort Records
script step to the script and then turn on “Perform
without dialog.”
Insert it after the
If
step and before the
End If
step. (If yours is somewhere else,
move it between these two steps.)
NOTE
FileMaker inserts new script steps just below any highlighted step. If no script step is high-
lighted, then the new script step lands at the end of your script.
7.
Turn on the “Specify sort order” checkbox, add the Last Name field and then
add the First Name field to the Sort Order list. Then click OK
.
You've written your first test. The rest of the script will be variations on this theme.
8.
Add the
Else If
script step to the script
.
You want
Else If
to come after the
Sort Records
step and before the
End If
step.
(If it doesn't land there, move it.)
9.
Click Specify. In the Specify Calculation box, type
Get(ScriptParameter) = “City”
and then click OK
.