Script Steps Reference

Table Of Contents
FILEMAKER SCRIPT STEPS REFERENCE 13
Script parameters:
exist within the parent script only unless explicitly passed to the sub-script, as shown in
examples three and four below. If your script calls another script, parameters in the called
script are independent of parameters in the parent script.
exist only for the duration of the script. Script parameters are reset each time a script is
performed.
can be used (but not modified) within a script and can be passed along to sub-scripts by
using the Get(ScriptParameter) function as the parameter for the sub-script. You can also
specify different parameters each time the sub-script is called using Perform Script.
Changing the parameters passed to a sub-script does not modify the value of the
parameters returned from Get(ScriptParameter) in the parent script.
can contain multiple values separated by carriage returns. Use the LeftValues function,
MiddleValues function, and RightValues function to isolate a specific parameter.
Tip If you've performed an external script and you want to return to the original file, add an Enter
Browse Mode step or Go to Layout step right after the Perform Script step in the original file, so that
the script returns to the original file.
Notes
If you are using FileMaker Pro Advanced to define a custom menu item that performs a
script, select the script and optional script parameters.
A runtime solution can perform an external script only if the external file is bound to the
solution.
When you create, duplicate, edit, or delete a script in the Specify Script dialog box, your
changes are not undone when you click Cancel.
Examples
#Example 1: This is a simple example with no parameters
Go to Layout ["Detailed Report"]
Perform Script ["Print in Landscape"]
#Example 2: This example uses the script parameter to set the
title of the report
Go to Layout ["Detailed Report"]
Perform Script [“Sort by Date”; Parameter: “Month End Report”]
Set Field [Sales::Report Title; Get (ScriptParameter)]
Perform Script ["Print in Landscape"]
#Example 3: This example uses a field value as a parameter
Go to Layout ["Detailed Report"]
Perform Script [“Find by Salesperson”; Parameter: Sales::Salesperson]
Set Field [Sales::Report Title; “Sales by “ & Get (ScriptParameter)]