2021.1

Table Of Contents
Control Scripts
When output is generated from a template, Control Scripts run before all other scripts, when a
record is merged with a context. They determine how different sections of the context are
handled. They can, for example, make the page numbering continue over all Print sections,
split Email attachments, or omit Print sections from the output.
Some knowledge of JavaScript is needed to edit Control Scripts, just as for any other self-made
scripts; see "Writing your own scripts" on page867. Some functionality is provided as a
Scripting Wizard, for example Conditional Print Sections.
See "Control Scripts" on page903.
Post Pagination Scripts
Post Pagination Scripts are run in a Print context after the content has been paginated.
Because they can search through the output of all Print sections, and modify Print sections (one
at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic:
"Creating a Table Of Contents" on page921.
See "Post Pagination Scripts" on page919.
Loading data
Before you can add variable data fields to a template in the Designer, you need to have a Data
Model and a sample of customer data. At the design stage the Designer doesn't need to have
access to all data; it just needs to know which data fields exist in your data and it needs some
data to be able to display a preview of the output.
To get access to a Data Model and data, you can open:
l A data mapping configuration, see "Loading a data mapping configuration" on page785.
A Data Model and sample data are part of a data mapping configuration.
l A data file, see "Adding data from a data file" on page786.
l A database, see "Adding data from a database" on page790.
l JSONsample data, see "Adding JSON sample data" on page794.
When you open a data file or a database, the Data Model will be derived from it. That is,
unless there already is an open data mapping configuration; in that case, the current data
Page 783