2019.1

Table Of Contents
Object Usage
on
page831
through the merge object: merge.template.
"merge" on
page815
The merge object gives access to the template with all of its contexts and
sections .
channel
(see
"Channel"
on
page836)
The channel for which output is generated. This is registered in the merge
object: merge.channel.
Note that the channel doesn't change when the output consists of different
contexts. When generating email, for example, the channel is EMAIL, even
when merging the Print context to attach it to the email.
"record" on
page752
The current record in the main data set. To get the value of a field in the
record, use record.fields['fieldname'] or record.fields.fieldname.
context
In a Control Script, the context object represents one context in the template.
Which contexts are available in the template can be queried using merge.template.contexts.
The context being merged can be queried using merge.context.
Field Type Description
sections Array
Array of sections (see "section" on page847) inside a
particular context defined in the template.
Note: When using merge.context.sections keep in mind that
for example 'Section X' might only exist in your Print context,
so using merge.context.sections['Section X'] without
enclosing it in the if statement if (merge.context.type ==
ContextType.PRINT) {} will yield an error when the script
runs for other contexts.
Alternatively, use the template object to access a specific
Page 812