Script Steps Reference

Table Of Contents
Chapter 2
|
Control script steps 17
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
entered by the user to another script, which creates a new account
Fields
account_name Text Global Storage
password Text Global Storage
Script: Get New Account Info
#Clear the Account Name and Password fields for new information
Set Field [first_table::account_name; ""]
Set Field [first_table::password; ""]
Show Custom Dialog ["Create A New Administrator Account";
"Please enter an account name and password for your new user.";
first_table::account_name;first_table::password]
Perform Script["Make new account; Parameter:
first_table::account_name & ¶ & first_table::password]