Script Steps Reference
Table Of Contents
- Contents
- About script steps
- Script steps reference (alphabetical list)
- Control script steps
- Perform Script
- Pause/Resume Script
- Exit Script
- Halt Script
- If
- Else If
- Else
- End If
- Loop
- Exit Loop If
- End Loop
- Allow User Abort
- Set Error Capture
- Set Variable
- Install OnTimer Script
- Navigation script steps
- Go to Layout
- Go to Record/Request/Page
- Go to Related Record
- Go to Portal Row
- Go to Object
- Go to Field
- Go to Next Field
- Go to Previous Field
- Enter Browse Mode
- Enter Find Mode
- Enter Preview Mode
- Editing script steps
- Fields script steps
- Set Field
- Set Field By Name
- 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
- Records script steps
- New Record/Request
- Duplicate Record/Request
- Delete Record/Request
- Delete Portal Row
- Delete All Records
- Open Record/Request
- Revert Record/Request
- Commit Records/Requests
- Copy Record/Request
- Copy All Records/Requests
- Import Records
- Export Records
- Save Records As Excel
- Save Records As PDF
- Save Records As Snapshot Link
- Found Sets script steps
- Windows script steps
- Files script steps
- Accounts script steps
- Spelling script steps
- Open Menu Item script steps
- Miscellaneous script steps
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)]