Script Steps Reference
Table Of Contents
- Chapter 1 Introduction
- Chapter 2 Control script steps
- Chapter 3 Navigation script steps
- Chapter 4 Editing script steps
- Chapter 5 Fields script steps
- Set Field
- 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
- Chapter 6 Records script steps
- Chapter 7 Found Sets script steps
- Chapter 8 Windows script steps
- Chapter 9 Files script steps
- Chapter 10 Accounts script steps
- Chapter 11 Spelling script steps
- Chapter 12 Open Menu Item script steps
- Chapter 13 Miscellaneous script steps
- Appendix A Glossary
16 FileMaker Script Steps Reference
Use script parameters to pass text or numbers into a script. When a parameter is
specified, that parameter may be accessed within a script or passed to other script steps
using the Get(ScriptParameter) function.
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
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.
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)]
#Example 4: This script uses script parameters to pass text