2021.2

Table Of Contents
Note
Control scripts are always executed first, regardless of where they are in the Scripts pane.
They can not be excluded from execution for a specific context or section, using the
execution scope of a folder; see "Execution scope" on the previous page. What you can
do is disable the script or the containing folder; see "Enable/disable scripts" below.
Tip
For more ways to optimize scripts, see "Optimizing scripts" on page892.
Enable/disable scripts
A disabled script will not run at all when the template is merged with a record set to generate
output. Disabling script execution in certain contexts or sections helps with performance, since
scripts normally run, whether or not their placeholder or selector is present in your template. It is
highly recommended to disable any script that is not relevant to specific sections or contexts.
When you disable a folder, all scripts in the folder will be disabled.
To enable or disable a script or a folder:
l On the Scripts pane, right-click the script or the folder and click Disable (if the script or
folder was enabled) or Enable (if the script or folder was disabled).
Tip
For more ways to optimize scripts, see "Optimizing scripts" on page892.
Import/export scripts
The easiest way to import scripts into another template is to open the template and use the
Import Resources dialog; see "Import Resources dialog" on page971.
Remember also to import or add any files that a script refers to.
Alternatively, scripts can be exported or imported via the Scripts pane.
To export a script:
Page 886