> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Objects

> Object model for Web Verification Station custom scripts: functions for fields, data sets, and the document form, plus commandArgs and field properties.

Below is a list of functions that are available for creating custom scripts. To access object instances, use the commandArgs variable.

All variables in this section are global and are visible across the entire program.

<Accordion title="Functions for working with fields">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Function</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>getCurrentField()</p></td><td><p>Returns a link to the field object that uses the current custom script.</p></td></tr><tr><td><p>getFieldByName(namesPath) <a href="#note">(\*)</a></p></td><td><p>Returns a link to the field for which the custom script has been opened.</p><p>Example: <br /><em>\['Document Section 1', 'Group\[10]','Field3'],</em> <br />where \[10] is the number of the instance of the repeating group.</p><ul><li><strong>namesPath</strong> is an array containing field and group names that form the path to the field or a link to a field object.</li></ul></td></tr><tr><td><p>getFieldValue(namesPath) <a href="#note">(\*)</a></p></td><td><p>Returns:</p><ul><li>a string for a <strong>TextField</strong> field;</li><li>a checkmark value for a <strong>Checkmark</strong> field;</li><li>a string array for a <strong>Checkmark Group</strong> field.</li></ul><p><strong>namesPath | fieldObject</strong>:</p><ul><li>an array containing field and group names that form the path to the field or a link to a field object,</li><li>or a link to the field object.</li></ul></td></tr><tr><td><p>setCurrentFieldValue(value, forced, onSaved)</p></td><td><p>Modifies the field value for which the custom script has been opened.</p><p>Parameters:</p><ul><li><strong>value</strong> – the field value.</li><li><strong>forced</strong> – updates the field value and records new data. This parameter is optional.</li><li><ul><li><strong>false</strong> – the field value in the Document Definition will be updated only after the <strong>save() </strong>function has been called.</li><li><strong>true</strong> – the field value in the Document Definition will be updated immediately.<br /> <br />For a custom script, an update will occur regardless of the mode. <br />By default, this parameter is set to <strong>false</strong>.</li></ul></li></ul><ul><li><strong>onSaved</strong> – callback function. Called if the <strong>forced</strong> parameter is set to <strong>true</strong>. This parameter is optional.</li></ul></td></tr><tr><td><p>setFieldValue(namesPath | field, value, forced, onSaved) <a href="#note">(\*)</a></p></td><td><p>Modifies the field value.</p><p>Parameters:</p><ul><li><strong>namesPath | fieldObject</strong>:</li><li><ul><li>an array containing field and group names that form the path to the field,</li><li>or a link to the field object.</li></ul></li></ul><ul><li><strong>value</strong> – value of the corresponding field.</li><li><strong>forced</strong> – updates the field value and records new data. This parameter is optional.</li><li><ul><li><strong>false</strong> – the field value in the Document Definition will be updated only after the <strong>save() </strong>function has been called.</li><li><strong>true</strong> – the field value in the Document Definition will be updated immediately.<br /> <br />For a custom script, an update will occur regardless of the mode.<br />By default, this parameter is set to <strong>false</strong>.</li></ul></li></ul><ul><li><strong>onSaved</strong> – A callback function. Called if the <strong>forced</strong> parameter is set to <strong>true</strong>. This parameter is optional.</li></ul></td></tr><tr><td><p>save()</p></td><td><p>Closes the window where the custom script is executed and saves the changes.</p></td></tr><tr><td><p>cancel()</p></td><td><p>Closes the window where the custom script is executed without saving the changes.</p></td></tr><tr><td colspan="2"><p><a id="note" /><strong>(\*)</strong> For some functions listed above, the path to the field is specified as an input parameter. It comprises the field name and the names of the parent elements (field group, section). For tables, repeating tables, and repeating groups, you need to specify the instance number starting at 0 (zero).</p><p>Example:<br /><em>\['Document Section 1', 'Group\[10]','Field3'], </em></p><p>where \[10] is the number of the instance of the repeating group.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Functions for working with data sets">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Function</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>addEntity(entityInfo: \{cacheName, columns, values}, onResult(newId))</p></td><td><p>Adds an entry to the data set.</p><p>Parameters:</p><ul><li><strong>entityInfo</strong> – an object:</li><li><ul><li><strong>cacheName</strong> – a name for the data set.</li><li><strong>columns</strong> – names for the columns where data will be recorded. Array of strings.</li><li><strong>values</strong> – the values for the corresponding columns. Array of strings.</li></ul></li></ul><ul><li><strong>onResult</strong> – a callback function that receives the ID of the record created in the data set.</li></ul></td></tr><tr><td><p>editEntity(entityInfo: \{cacheName, columns, values}, onResult())</p></td><td><p>Edits an entry in the database.</p><p>Parameters:</p><ul><li><strong>entityInfo</strong> – an object:</li><li><ul><li><strong>cacheName</strong> – a name for the data set.</li><li><strong>columns</strong> – names for the columns where data will be recorded. Array of strings.</li><li><strong>values</strong> – the values for the corresponding columns. Array of strings.</li></ul></li></ul><ul><li><strong>onResult</strong> – a callback function.</li></ul></td></tr><tr><td><p>getDict(\{cacheName, filters: \[\{FieldName, FieldValue}], cursorPos, allowMultipleColumnResults}, onResult (param: \{ FieldName, FieldValue, BoldMask}\[]\[]) )</p></td><td><p>Carries out a data set search for a specified value or for a part of it. Returns the matching strings in the following format:</p><p>\[\{FieldName<br />FieldValue<br />BoldMask}].</p><p>Parameters:</p><ul><li><strong>cacheName</strong> – the data set name.</li><li><strong>filters</strong> – search parameters:</li><li><ul><li><strong>FieldName</strong> – the field name. Leave empty to search all fields.</li><li><strong>FieldValue</strong> – the field value.</li></ul></li></ul><ul><li><strong>cursorPos</strong> – the position of the cursor in the entry field.</li></ul><ul><li><ul><li>If a value was entered partially and the cursor is positioned after the typed symbols, they will be considered as a prefix for the value that is being searched for.</li><li>If the cursor is positioned before a partially typed word, those symbols will be considered as the ending of the value that is being searched for.<br /> <br />For example, if, when searching for a company name, you type in "ADO" and the cursor is positioned after it, the value "AVOCADO" will be selected.<br />If you type in "ADO" and the cursor is positioned in front of it, the value "ADONIS" will be selected.</li></ul></li></ul><ul><li><strong>allowMultipleColumnResults</strong> – Returns the values of the fields that have been found.<br />The data set may contain entries for which one field name (<strong>FieldName</strong>) corresponds to multiple field values (<strong>FieldValue</strong>). For example, two or more variations of a company's name may be specified in the CompanyName column. <br /> <br />In this case:</li><li><ul><li><strong>true</strong> – returns and records all field values that satisfy the search conditions,</li><li><strong>false</strong> – returns and records a single result that best fits the search conditions.</li></ul></li></ul><ul><li><strong>onResult</strong> – a callback function that returns a search result array. Each result is a single string from the data set, which is a string array. Each string comprises the field name, its value, and the <strong>BoldMask </strong>parameter.<br /> <br /><strong>BoldMask</strong> – a string of ‘<strong>0</strong>’ and ‘<strong>1</strong>’ the same length as the value found during the search. '<strong>1</strong>' represents a symbol from the found value that matches the corresponding symbol in the search field, and '<strong>0</strong>' represents a symbol that does not.</li></ul><p>If, for example, the following is present in a data set:</p><p>CompanyName: ABBYY</p><p>Let's assume that a search is carried out for the symbols "ABB".</p><p>Then, the following will be returned:</p><p>\[</p><p>\[</p><p>\{</p><p>FieldName: ‘CompanyName’,</p><p>FieldValue: ‘ABBYY’,</p><p>BoldMask: ‘11100’</p><p>},</p><p>]</p><p>]</p><p><strong>Note: </strong>  The returned array can contain several values, including those that did not initially fit the search conditions. The search results in the array will be sorted by BoldMask parameter value in descending order (i.e. starting with strings that best match the search conditions).</p></td></tr><tr><td><p>getDictAll(\{cacheName, filters: \{FieldName, FieldValue}}, }, onResult (param: \{ FieldName, FieldValue, BoldMask}\[]\[]))</p></td><td><p>Carries out a database search for the entire value specified. Returns the values of all fields that have been found.</p><p>Parameters:</p><ul><li><strong>cacheName</strong> – the data set name.</li><li><strong>Filters</strong> – an object array:</li><li><ul><li><strong>FieldName</strong> – the field name. In order to search on all fields, this should be left blank.</li><li><strong>FieldValue</strong> – the field value.</li></ul></li></ul><ul><li><strong>onResult</strong> – a callback function that returns a search result array. Each result is a single string from the data set, which is itself a string array. Each string comprises the field name, its value, and the <strong>BoldMask </strong>parameter.<br /> <br /><strong>BoldMask</strong> – a string of ‘<strong>0</strong>’ and ‘<strong>1</strong>’ the same length as the value found during the search. '<strong>1</strong>' represents a symbol from the found value that matches the corresponding symbol in the search field, and '<strong>0</strong>' represents a symbol that does not.<br /> <br /> <br />If, for example, the following is present in a data set:<br /> <br />CompanyName: ABBYY<br /> <br />Let's assume that a search is carried out for the symbols "ABB".<br /> <br />Then, the following will be returned:</li></ul><p>\[</p><p>\[</p><p>\{</p><p>FieldName: ‘CompanyName’,</p><p>FieldValue: ‘ABBYY’,</p><p>BoldMask: ‘11100’</p><p>},</p><p>]</p><p>]</p><p><strong>Note: </strong>  The returned array can contain several values, including those that did not initially fit the search conditions. The search results in the array will be sorted by BoldMask parameter value in descending order (i.e. starting with strings that best match the search conditions).</p></td></tr><tr><td colspan="2"><p><a href="/flexi-capture/appendix/scripts/web-custom-action-db-lookup">Sample database search script</a></p></td></tr></tbody></table>
</Accordion>

<Accordion title="Functions for working with the document form">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Function</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>selectRow(tablePath, rowNumber) <a href="#note2">(\*)</a></p></td><td><p>Marks a table row as selected.</p><ul><li><strong>tablePath | fieldObject</strong>:</li><li><ul><li>an array of field and group names that form the path to the table field,</li><li>or a link to a table object.</li></ul></li></ul><ul><li><strong>rowNumber</strong> – the number of the row to select, zero-based.</li></ul></td></tr><tr><td><p>deselectRow(tablePath, rowNumber?) <a href="#note2">(\*)</a></p></td><td><p>Removes selection from a table row.</p><ul><li><strong>tablePath | fieldObject</strong>:</li></ul><ul><li><ul><li>an array of field and group names that form the path to the table field,</li><li>or a link to a table object.</li></ul></li></ul><ul><li><strong>rowNumber</strong> – the number of the row to deselect, zero-based, if omitted the selection is removed from all rows in the table.</li></ul></td></tr><tr><td><p>scrollFormToField(namesPath) <a href="#note2">(\*)</a></p></td><td><p>Scrolls the form editor to get the field into view.</p><ul><li><strong>namesPath | fieldObject</strong>:</li></ul><ul><li><ul><li>an array of field and group names that form the path to the table field,</li><li>or a link to a table object.</li></ul></li></ul></td></tr><tr><td><p>getDomElementPosition(domId, onResult: (result?: \{width, height, top, left, right, bottom}))</p></td><td><p>Gets the position of an element in the form editor window and returns the result of a callback function.</p><ul><li><strong>domId</strong> – element ID in DOM format.</li><li><strong>onResult</strong> – a callback function that receives the object with the DOM coordinates of the element (width, height, top, left, right, bottom) relative to the top left corner of the browser window.</li></ul></td></tr><tr><td><p>setStyles(styles, callback)</p></td><td><p>Adds CSS styles to the custom action frame window.</p><ul><li><strong>styles</strong> – an object with CSS property names and values. <br /> <br />example:<br />\{<br />display: 'block',<br />position: 'absolute',<br />top: '0px',<br />bottom: '0px',<br />left: '0px',<br />right: '0px',<br />width: '100%',<br />height: '100%',<br />border: '0',<br />overflow: 'hidden',<br />'overflow-x': 'hidden',<br />'overflow-y': 'hidden',<br />'z-index': '10000'<br />}</li><li><strong>callback</strong> – a callback function.</li></ul></td></tr><tr><td colspan="2"><p><a id="note" /><strong>(\*)</strong> For some functions listed above, the path to the field is specified as an input parameter. It comprises the field name and the names of the parent elements (field group, section). For tables, repeating tables, and repeating groups, you need to specify the instance number starting at zero.</p><p>Example:<br /><em>\['Document Section 1', 'Group\[10]','Field3'], </em></p><p>where \[10] is the number of the instance of the repeating group.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Properties of the commandArgs object">
  **Variables**

  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Variable</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>commandArgs.params.document</p></td><td><p>Document</p></td><td><p>Stores an object copy of an open document. This can be used to get access to any error, field, or region for the current document.</p></td></tr><tr><td><p>commandArgs.params.currentField</p></td><td><p>(Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField)</p></td><td><p>Returns a link to a field object that reflects the state of the field at the time when the script is called. Part of the document specified above.</p><p><strong>Note: </strong>  If the field value was modified after the script was initialized, the changes will not be applied.</p></td></tr><tr><td><p>commandArgs.params.appPath</p></td><td><p>String</p></td><td><p>The server's domain name.</p></td></tr><tr><td><p>commandArgs.params.coordinates</p></td><td><p>Object<br />\[\{X1,X2,Y1,Y2}]</p></td><td><p>The coordinates of the DOM element that called the custom script.</p></td></tr><tr><td><p>commandArgs.params.currentElementDomId</p></td><td><p>String</p></td><td><p>The ID of the DOM element that called the custom script.</p></td></tr></tbody></table>

  **Functions**

  | **Function**                          | **Description**                                                      |
  | ------------------------------------- | -------------------------------------------------------------------- |
  | commandArgs.events.addEventHandler    | Adds an event handler in the global context of the custom script.    |
  | commandArgs.events.triggerHandlers    | Triggers an event in the global context of the custom script.        |
  | commandArgs.events.removeEventHandler | Deletes an event handler in the global context of the custom script. |
</Accordion>

<Accordion title="Field Group field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Fields</p></td><td><p>(Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField)\[]</p></td><td><p>Read-only</p></td><td><p>Array of fields</p></td></tr><tr><td><p>HasTableLayout</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies if the field region is a table.</p></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>4</strong> – field group</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether editing of fields is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name for the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr></tbody></table>
</Accordion>

<Accordion title="Section field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description </strong></p></th></tr></thead><tbody><tr><td><p>Fields</p></td><td><p>(Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField)\[]</p></td><td><p>Read-only</p></td><td><p>Array of fields</p></td></tr><tr><td><p>Pageids</p></td><td><p>Number\[]</p></td><td><p>Read-only</p></td><td><p>Identifiers of the pages on which the section is located.</p></td></tr><tr><td><p>IsFlexible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the section is flexible.</p></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>6</strong> – section</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li>Id – region ID.</li><li>Status – status of the region.</li></ul><ul><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li>PageId – ID of the page on which the region is located.</li><li>IsNew – flag to indicate new regions.</li><li>Coordinates – coordinates of the region in the image.</li></ul></td></tr></tbody></table>
</Accordion>

<Accordion title="Table field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Rows</p></td><td><p>\{<br /> Id: number;<br /> RowNumber: number;<br /> HasColorImage: boolean;<br /> TableBlockID: number\[];<br /> Cells: (Picture | Checkmark | CheckmarkGroup | TextField)\[];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>List of table rows.</p><p>The parameters of the object line in the table:</p><ul><li><strong>Id</strong> – row ID.</li><li><strong>RowNumber</strong> – the sequence number of the row, counting from zero.</li><li><strong>TableBlockId</strong> – identifiers of sections, tables, table blocks forming the path to the table block..</li><li><strong>Cells</strong> – fields in table cells. Fields can be of the following types: picture, checkmark, checkmark group, text.</li></ul></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>7</strong> – table</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li></ul><ul><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr></tbody></table>
</Accordion>

<Accordion title="Text entry field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Flags</p></td><td><p>Number\[]</p></td><td><p>Read/write</p></td><td><p>array of the same length as the field <strong>Value</strong>. Consists of 0 and 1.</p><p><strong>0</strong> – a character that is in <strong>Value</strong> in the same position as 0 in <strong>Flags</strong>, requires verification.</p></td></tr><tr><td><p>Suggests</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>List of suggested field values</p></td></tr><tr><td><p>Value</p></td><td><p>String</p></td><td><p>Read/write</p></td><td><p>Field value</p></td></tr><tr><td><p>TextType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Type of text field. Possible value:</p><ul><li><strong>0</strong> – text field.</li><li><strong>1</strong> – numeric field.</li><li><strong>2</strong> – currency amount fields.</li><li><strong>3</strong> – DateTime field.</li><li><strong>4</strong> – Date field.</li><li><strong>5</strong> – Time field.</li><li><strong>6</strong> – Code field.</li></ul></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>0</strong> – text field</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li></ul><ul><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr><tr><td><p>IsVerified</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether the field has been verified.</p></td></tr><tr><td><p>NeedVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires verification.</p></td></tr><tr><td><p>NeedDoubleVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires double verification</p></td></tr><tr><td><p>IsSummary</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is used in the formation of data summary on the data form.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Checkmark field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Value</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Field value</p></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>2</strong> – checkmark</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li></ul><ul><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr><tr><td><p>IsVerified</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether the field has been verified.</p></td></tr><tr><td><p>NeedVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires verification.</p></td></tr><tr><td><p>NeedDoubleVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires double verification.</p></td></tr><tr><td><p>IsSummary</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is used in the formation of data summary on the data form.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Checkmark Group field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>MaxSelectedCount</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of selected field values.</p></td></tr><tr><td><p>MinSelectedCount</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Minimum number of selected field values.</p></td></tr><tr><td><p>Values</p></td><td><p>Number\[]</p></td><td><p>Read/write</p></td><td><p>Field value. An array of record IDs that make up the list of possible field values (<strong>Variants</strong>).</p></td></tr><tr><td><p>Variants</p></td><td><p>\{Id:number, Name:string}\[]</p></td><td><p>Read-only</p></td><td><p>List of possible field values:</p><ul><li><strong>Id</strong> – record ID</li><li><strong>Name</strong> – record name</li></ul></td></tr><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>3</strong> – checkmark group</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID.</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>NeedRecognize</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether to retrieve the field value from the region when the rules are checked again.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li></ul><ul><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr><tr><td><p>IsVerified</p></td><td><p>Boolean</p></td><td><p>Read/write</p></td><td><p>Specifies whether the field has been verified.</p></td></tr><tr><td><p>NeedVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires verification.</p></td></tr><tr><td><p>NeedDoubleVerification</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field requires double verification.</p></td></tr><tr><td><p>IsSummary</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is used in the formation of data summary on the data form.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Picture field">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Caption</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Custom field name, caption</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type. Possible value:</p><p><strong>1</strong> – picture</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID.</p></td></tr><tr><td><p>IsReadOnly</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether field editing is disallowed.</p></td></tr><tr><td><p>IsVisible</p></td><td><p>Boolean</p></td><td><p>Read-only</p></td><td><p>Specifies whether the field is visible on the data form.</p></td></tr><tr><td><p>MaxRegions</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Maximum number of field regions. If the value is <strong>-1</strong>, any number of regions is allowed.</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Service name of the field.</p></td></tr><tr><td><p>NamePath</p></td><td><p>String\[]</p></td><td><p>Read-only</p></td><td><p>Array of field and group names that form the path to the field.</p></td></tr><tr><td><p>Regions</p></td><td><p>\{<br /> Id: number;<br /> Status: number;<br /> PageId: Number;<br /> IsNew : Boolean;<br /> Coordinates: Object<br /> \[\{X1,X2,Y1,Y2}];<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Array of regions.</p><ul><li><strong>Id</strong> – region ID.</li></ul><ul><li><strong>Status</strong> – status of the region.</li><li><ul><li><strong>0</strong> – region not superimposed (or region is deleted)</li><li><strong>1</strong> – region is not recognized</li><li><strong>2</strong> – the value from the region is substituted in the field</li></ul></li></ul><ul><li><strong>PageId</strong> – ID of the page on which the region is located.</li><li><strong>IsNew</strong> – flag to indicate new regions.</li><li><strong>Coordinates</strong> – coordinates of the region in the image.</li></ul></td></tr></tbody></table>
</Accordion>

<Accordion title="Repeating Group of Sections field">
  <table width="100%"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>Type</strong></p></td><td><p><strong>Rights</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field ID</p></td></tr><tr><td><p>Name</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>Field name</p></td></tr><tr><td><p>Sections</p></td><td><p>Section\[]</p></td><td><p>Read-only</p></td><td><p>Array of fields of <a href="#section">Section</a> type</p></td></tr><tr><td><p>FieldType</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Field type.</p><p>Possible value:</p><p><strong>8</strong> – recurring section group.</p></td></tr></tbody></table>
</Accordion>

<Accordion title="Properties of the document object">
  <table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Rights</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>AssemblingErrors</p></td><td><p>\{<br /> DocumentNodeRef: number\[]\[];<br />Description: string;<br />SectionName: string\[]<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Build errors in the document where:</p><ul><li><strong>DocumentNodeRef</strong> – list of links as an array of field IDs to fields in the form</li><li><strong>Description</strong> – error description</li><li><strong>SectionName</strong> – list of sections involved in the error</li></ul></td></tr><tr><td><p>BatchId</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>The package ID</p></td></tr><tr><td><p>Errors</p></td><td><p>\{<br /> DocumentNodeRef: number\[]\[];<br /> Severity: number;<br /> Message: string;<br /> RuleName: string;<br />}\[]</p></td><td><p>Read-only</p></td><td><p>Errors in the document where:</p><ul><li><strong>DocumentNodeRef</strong> – list of links as an array of field IDs to fields in the form</li><li><strong>Severity</strong>:</li><li><ul><li><strong>1</strong> – Error,</li><li><strong>0</strong> – Warning</li></ul></li></ul><ul><li><strong>Message</strong> – error text</li><li><strong>RuleName</strong> – the name of the rule that caused the error</li></ul></td></tr><tr><td><p>Fields</p></td><td><p>(Section | SectionsGroup)\[]</p></td><td><p>Read-only</p></td><td><p>List of sections/duplicate sections</p></td></tr><tr><td><p>Id</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Document identifier</p></td></tr><tr><td><p>Index</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Index of the document in the package</p></td></tr><tr><td><p>Pages</p></td><td><p>\{<br /> Id: number;<br /> Modification: number;<br /> HasColorImage: boolean;<br /> ImageResolution: number;<br /> KeyValue: string;<br /> SectionTemplateId: number;<br /> SectionTemplateName: string;<br /> FlexibleInstanceId: number;<br /> SectionTemplatePageNumber: number;<br /> Comment: string;<br /> ImageWidth: number;<br /> ImageHeight: number;<br />}\[]</p></td><td><p>Read-only</p></td><td><p>List of document pages containing the following:</p><ul><li><strong>Id</strong> – page ID</li><li><strong>Modification</strong> – the revision number of the page</li><li><strong>HasColorImage</strong> –specifies the color of the page</li><li><strong>ImageResolution</strong> – image resolution</li><li><strong>KeyValue</strong> – the value of the key field page</li><li><strong>SectionTemplateId</strong> – ID section of the page</li><li><strong>SectionTemplateName</strong> – page section name</li><li><strong>SectionTemplatePageNumber</strong> – the page number in the section</li><li><strong>Comment</strong> – review of the page</li><li><strong>ImageWidth</strong> –width of the image page</li><li><strong>ImageHeight</strong> – height of the page image</li></ul></td></tr><tr><td><p>ProjectId</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Project identifier</p></td></tr><tr><td><p>TaskId</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Task ID</p></td></tr><tr><td><p>TemplateId</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Definition ID of the document</p></td></tr><tr><td><p>TemplateName</p></td><td><p>String</p></td><td><p>Read-only</p></td><td><p>The name of the definitions document</p></td></tr><tr><td><p>TemplateVersion</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Definition version of the document</p></td></tr><tr><td><p>Version</p></td><td><p>Number</p></td><td><p>Read-only</p></td><td><p>Document version</p></td></tr></tbody></table>
</Accordion>
