2019.2

Table Of Contents
Tip
For more examples of using conditions, see this how-to: Combining record-based conditions.
If an expanded script contains errors or if there are warnings, icons appear in the overview ruler
on the right hand side of the editing area. These icons are shown relative to their position in the
script and do not move as you scroll down. You can click on an icon to quickly jump to the error
or warning. Script errors are highlighted by a red icon, and warnings in yellow. The topmost
icon will display red if any errors exist in the script at all.
Designer API
Features like results and record do not exist in the native JavaScript library. These are
additional JavaScript features, designed for use in Connect scripts only. All features designed
for use in the Designer are listed in the Designer's API, with a lot of examples; see "Standard
Script API" on page1287.
Managing scripts
Changing the order of execution
When a record set is merged with a template to generate output, all scripts are executed once
for every record in the record set, in the order in which they appear in the Scripts pane at the
bottom left.
The order in which scripts are executed is particularly important when one script produces
content that contains a selector for another script. If the other script has already been executed,
it will not run again automatically. So, scripts that produce content that contains one or more
selectors for other scripts, need to come first.
To change the order in which scripts are executed:
l
Click a script or a folder in the Scripts pane at the bottom. Drag it up or down and drop it.
Note
Control scripts are always executed first, regardless of where they are in the Scripts pane.
Page 859