Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER SCRIPT STEPS REFERENCE 14
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. For more information, see Defining
custom menus (FileMaker Pro Advanced).
A runtime solution can perform an external script only if the external file is bound to the
solution.
Example 1
Runs the "Print Invoice Report" script with no parameters.
Go to Layout ["Invoice Report"]
Perform Script ["Print Invoice Report"]
Example 2
Uses a field value, Customer Name, as the parameter. Invoices for the current customer are
returned in a new window with the Invoice Report layout.
Main script: Current Customer Invoices
Find Matching Records [Replace; Invoices::Customer ID]
#Calls the "View Customer Invoices" sub-script defined below
Perform Script ["View Customer Invoices"; Parameter:
Invoices::Customer Name]
Sub-script: View Customer Invoices
New Window [Name: "Customer: " & Get ( ScriptParameter ); Style:
Document]
Go to Layout ["Invoice Report"]
Sort Records [Restore; No dialog]