2018.2

Table Of Contents
This object (as well as the info() function) is only available in Post Pagination Scripts (see "Post
Pagination Scripts" on page766). It is essential in a Post Pagination Script that creates a table
of contents, as described in the following topic: "Creating a Table Of Contents" on page767.
Field Type Description
pageCount Number
The number of pages in the section in which the first element of
the results is located.
pageNo Number The page number on which the first element of the results is
located.
"section"
on
page1196
Section The section in which the element is located. This is always a
Print section, since Post Pagination Scripts only operate on the
Print context.
sheetCount Number The number of sheets in the section in which the first element of
the results is located.
sheetNo Number The sheet number on which the first element of the results is
located.
results
The results object (type: QueryResults) is the result of the query for HTML elements that match
the selector of the script. The selector of a script can be specified in the Script Editor and is
visible in the second column of the Scripts pane, next to the name of the script.
If, for example, a script would have the selector p.onlyCanada, the script would apply to all
paragraphs that have the class onlyCanada. (Classes can be defined in the Attributes pane at
the right: select the element in the content and type the class(es) in the Class field.)
The script could then use the results object to hide or show those paragraphs, depending on
the value of the data field Country in the current record:
if (record.fields["Country"] == "CANADA") {
results.show();
} else {
results.hide();
}
Page 1192