Automation rule
Automation rule
This example demonstrates a table data check. The rule checks whether the table data matches the value in the resulting field. The table has columns with prices and quantities of certain goods. The rule has been written at the level of a section containing the table and the resulting field.
Code of an ActiveX component
The code provided here is a CheckDoc class code from the AutomationRule project, which is used in the scripts mentioned above.Search in the variants list
Search in the variants list
The rule code provided below checks whether the field value matches one of the values in the list. If not, a rule error flag appears, and the field receives a list of suggested values. Depending on the check result, the field is marked as certainly or uncertainly recognized.
Field match check
Field match check
The rule code provided below checks whether the checked field has matched.
Checkmark check
Checkmark check
The rule code provided below checks whether the checkmark has been selected or not
Checkmark group check
Checkmark group check
The rule code provided below iterates all the checkmarks in the group and if none are selected, selects the first one. The rule is written for the checkmark group level. All the checkmarks in the group have been added to the list of fields included into the rule. The group itself has been excluded from the list. For the default checkmark (the first one), the ReadOnly flag has been disabled. If there are no checkmarks in the group, a rule error flag is enabled.This sample code iterates all the fields included in the rule. Since field names are not specified in the code, this code can be used for any checkmark group.
Field reliability check
Field reliability check
The rule code provided below checks the number of uncertain characters in the field and clears the field if the number of uncertain characters is greater than or equals three. This is an Autocorrection script.
Character replacement without loosing regions and verification flags
Character replacement without loosing regions and verification flags
The script replaces ”+” with ”&” without loosing information about regions and verification flags. This is an Autocorrection script.
Batch integrity check
Batch integrity check
Checks if the number of documents specified on the control page coincides with the inventory in the batch and with the number of documents actually processed. If the numbers do not match, an error is returned.
Counting the number of documents and pages in a document set
Counting the number of documents and pages in a document set
This script counts the number of pages in a document set section and throws an error if the set contains an element of an unknown type.
Address parsing
Address parsing
The script parses the address into the following componnets: ZIP Code, Country, City, and Street. The script is called for a portion of the source field.
