_system
(Merge only)
_system
is a JavaScript object which has a number of methods (functions) and properties related to the active Merge run. These include access to current data, form, script file names as well as active page and document counts.
Functions and Properties
_system. _dataFile | The path and filename of the data file being processed. |
_system. _event | The name of the script event currently being executed. |
_system. _formFile | The path and filename of the form template being processed. |
_system. _ndocuments | The total number of documents processed so far. This value may be different from |
_system. _nPages | The total number of pages in the current document processed so far. This counts visible, numbered, pages only. |
_system. _nTotalPages | The total number of pages (all documents) processed so far. This counts visible, numbered, pages only. This object is different from |
| The path and filename of the script file being processed (or null). |
_system.docPageCount([ bIncludeNumberedPages], [ bIncludeUnnumberedPages]) | Pages in the current document. (As of 3.0.002.06) By default, bIncludeNumberedPages is true, and bIncludeUnnumberedPages is false. Typically, the unnumbered pages are for preamble material, separator pages, or terms and conditions pages, whereas the numbered pages are typically the core' of the document. By default, you get back the count of the numbered pages only. |
_system.rename( from, to[, charReplacement]) | Rename a data XML tag name. This function may be used at the Start of Job script event to rename data tags to match the form template. from is the name as it appears in the data file. This string is case-insensitive. to is the name in use within the form. This string is case-sensitive and will be used exactly as passed to the method. All occurrences of from are changed, no matter at what level within the data file. To have an effect, this method must be called prior to any data being loaded, that is in the Start of Job event script. All subsequent references to the object must use the new to name. (As of 3.1.001.21) The optional third parameter, charReplacement can be used to indicate character replacement. In that case, each instance of any character in the "from" string will be replaced by the "to" string. Examples:
Will rename any item in the data file named "JF01" to "InvoiceDate".
Will replace all dashes and dots with underscores in any data name. |
_system.setDecimal( char) | Set the character to be interpreted as the decimal point. This is not part of the |
_system.totalPageCount([ bIncludeNumberedPages], [ bIncludeUnnumberedPages]) | Pages in the Merge run as a whole. See _system.docPageCount() above for parameter settings. |