Skip to main content
ABBYY Vantage allows you to add scripted rules with business logic to a Document skill. These rules may compare field values, check a condition when a field is filled in, or change the values of some fields.

Setting Up Advanced Script Rules

When setting up an Advanced Script Rule, you will first need to specify all fields that will be referenced by the script.

Field Configuration

In the Fields column, specify all fields that the script needs to have read access to. In the Changed by the rule column, specify all fields that will be edited by the script. If your script attempts to reference a field that was not specified for reading or modify a field that was not specified for editing, the rule will return an access error:
  • Attempt to read data from inaccessible field
  • Attempt to write data to read-only field

Table Column Configuration

If different table columns are specified as the parameters of the method, then when setting up the rule for the first time, you need to select those specific columns in the list of processed fields, and not the entire table. All of these columns should be part of the same table. For example, if the rule is applied to Column 1 and Column 2 of New table, you will need to select the following fields: Rule Settings Configuration

Script Implementation

Next, switch to the script editor and enter the JavaScript code that implements your rule. You can use the quick edit buttons at the top to enter code snippets.

Script Capabilities

Your script can access the document fields, calculate and compare their values. If the rule conditions are not satisfied, the script should set the value of the CheckSucceeded property of the Context global object to false.

Additional Resources

See the detailed description of objects to use in your scripts. For a list of sample scripts, see this article.