2020.2

Table Of Contents
section.sheetConfig.positions.all.masterBack = undefined; // or
null, or an empty string
The following script ensures that empty backsides of single sheets are omitted.
let section = merge.template.contexts.PRINT.sections["Section 1"];
section.sheetConfig.positions.single.omitMasterOnEmptyBackside =
true;
clone()
This function returns a copy of one HTML element or of a set of HTML elements, which can be:
l The elements that match the selector of a script (see "results" on page1420).
l One element that matches the selector of a script that runs for "Each matched element"
(see "this" on page1338 and "Setting the scope of a script" on page860).
l The elements returned by a query in the template (see "query()" on page1293).
See also: "Dynamically adding sections (cloning)" on page901.
To duplicate an existing template element, clone it before calling append(); see "append()" on
page1347.
Examples
This script performs an iteration over the elements in the results (the elements that match the
selector of the script).
var row = query("tbody tr", results).clone();
query("tbody", results).append(row);
The following script clones an existing table row to match the number of rows in a detail table.
Afterwards it iterates over the rows to populate the fields.
// Create the number of rows based on the records in the detail
table
// We start at 1 so the boilerplate row is used too and there is no
need to delete that row
for(var r = 1; r < record.tables['detail'].length; r++) {
results.parent().append(results.clone());
}
Page 1406