User manual

Table Of Contents
10-4
FileMaker Pro User’s Guide
Tip Save a clone (or copy) of your database, and then define and test
your script in it to preserve the original data. After testing the script,
import data from the original file into the clone, or use the Import
Script feature to import this script into your database. See “Importing
scripts” on page 10-11, for more information on this feature.
Storing settings before creating a script
When you define a script, FileMaker Pro saves the current settings
for importing, exporting, finding, sorting, and print setup (Windows)
or page setup Mac OS). When these script steps are placed in your
script, FileMaker Pro can restore settings for these actions when you
perform the script.
To store settings for a script, specify them before adding Print or
Page Setup, Print, Import Records, Perform Find, Sort, or Export
Records steps to a script.
Keep these points in mind:
1 To use the settings when you perform the script, select the Restore
option for the Print Setup (Windows) or Page Setup (Mac OS),
Import Records, Perform Find, Sort, or Export Records steps.
1 A script can store only one of each type of setting, for example, one
set of find requests and one sort order. If you need more than one,
define a subscript that stores different settings.
1 To see the settings you stored with a script, print the script
definition. You can print the definition for a single script or all scripts
by clicking the Print button in the Define Scripts dialog box.
1 You can enter settings when you perform a script instead of using
stored settings by specifying that FileMaker Pro display a dialog
when the script step is executed.
For example, if you add a Sort step and deselect the Restore sort order
and Perform without dialog options, the Sort dialog box appears when
you perform the script and displays the last sort used in the file. If
you select Restore sort order and deselect Perform without dialog, the
dialog box displays default settings that the user can perform or
modify.
Defining scripts
Define scripts in ScriptMaker by choosing steps and arranging them in
the order you want FileMaker Pro to perform them. If you’re using a
subscript, define it first, and then define the script that calls (uses) it.
1. If you’re defining a script that uses Print Setup (Windows) or Page
Setup (Mac OS), Import, Export, Find, or Sort, first store the settings
for the script.
2. Choose Scripts menu > ScriptMaker.
3. In the Define Scripts dialog box, type the name of the new script,
then click Create.
4. In the Script Definition dialog box, choose steps for the script.
To specify Do this
Print setup (Windows)
Page setup (Mac OS)
Choose File menu > Print Setup or Page Setup. Select the
settings you want, then click OK. See “Preparing to
print,” on page 4-2.
Import order Import records using the field order you want to store.
See “Importing data into FileMaker Pro,” on
page 12-2.
Find requests In Find mode, create the find requests. You don’t have
to click Find to perform the requests. See “Finding
records,” on page 3-1.
Sort order In Browse mode, choose Sort from the Mode menu,
and then choose the fields you want to sort by and the
sort order. Click Done. You don’t have to actually
perform the sort. See “Sorting records,” on page 3-8.
Export order Export records using the field order you want to store.
See “Exporting data from FileMaker Pro,” on
page 12-6.