Skip to main content
Rules provide an additional way to check captured data. Use them to set restrictions on the data in particular fields, that is, the conditions the captured values must meet. You can also use rules to process captured values. For example, you can merge values from several fields, or replace captured values with values from a database. You can set how strict a rule is: whether it issues a warning or an error when violated. Fields with rule warnings are marked with a yellow flag, and fields with rule errors with a red flag. For more information, see Rules and format errors. Rules are set up on the Rules tab of the properties dialog box of a field, section, Document Definition, or another item that supports rules.

View rules

Use the Show rules dropdown list to choose which rules to display. In the option names, %0 is replaced with the name of the current object.
You can create a new rule when you show rules owned by %0 or owned by %0 and its children. You cannot create a new rule when you show rules that refer to %0.

Filter rules

You can filter the list of rules to make it easier to manage, for example to show only rules that involve a specific field or condition. To open the Filter dialog box, click the Filter button on the Rules tab. The condition options for If this condition is true are: Specifying several criteria shows only the rules that meet all of them. The criteria appear as a text string next to the Filter button. To clear the filter, click the clear-filter button; all rules are shown again. The filter clears automatically when you close the Rules dialog box.

Filter example

Suppose you set up two rules:
  • FirstRule applies if Currency = EUR, USD.
  • SecondRule applies if Currency = EUR, RUR.
The following table shows which rules appear for different filter criteria:

Set up rules

The list of rules shows all the rules that have been set up, along with some criteria of each. To create a rule, click New Rule on the Rules tab, select the rule type, and click OK. The New Rule dialog box has the following options:

Rule severity

Severity sets how a rule violation is flagged: as an Error or a Warning. When a rule is violated, an error message and a flag are generated. If you try to export documents that have rule errors, a notification appears, but the documents can still be exported.
Severity is not available for the Calculate Sum and Merge Fields rules.

Rule types

The remaining options depend on the rule type:
A rule set for a repeating field group is applied to each group instance individually. A rule set inside a group is applied only to that group instance.

Conditions for applying rules

Rules can be triggered when a certain field has a specific value. When you create or edit a rule, select Always or If this condition is true to set when the rule applies. To set a triggering condition, select If this condition is true, and then click Edit to open the Condition for Applying Rule dialog box. In the dialog box, select a field and the condition that triggers the rule: You can also specify a range of permitted values. To add a value, type it and click Add; to remove one, select it and click Delete. To add an empty value, click Add without typing anything. A value can be added only once. Conditions can involve text fields (including fields with continued regions), barcodes, and table columns. They cannot involve checkmarks, checkmark groups, fields with multiple instances, images, or table cells.
If the Show on verification option is not enabled for a field, errors related to that field are not displayed during verification. The document then has an error flag that cannot be removed.

Rule chains

A rule chain is a group of rules with a specific order of application. It lets you set up several rules that involve the same field.
1

Create a chain

On the Rules tab, click Chains. In the dialog box that opens, click New Chain, provide a name and an optional comment, and click OK.
2

Add rules to the chain

Click Add Rule, select the rules, and use the Move Up and Move Down buttons to arrange them in the order you want them applied.
Each rule can belong to only one chain.
If you add an editable field (the Read-only option is disabled in its properties) to a rule that already belongs to a chain, you are prompted to merge the rule with the chain. If you agree and the rule belongs to another chain, the two chains are merged into one.

Where rules are stored

Rules are stored at the level of the item where they were created: a field, a section, or the Document Definition itself. In most cases the storage location does not matter. However, for a complex Document Definition with several field groups or recurring elements, be sure you know where each rule is stored. For example, if a group has fields subject to a rule, store that rule in the group or in one of its fields; otherwise the rule is not copied to new instances of the group. In an item’s properties dialog box, use the Show rules dropdown list to see the rules that refer to the item, are owned by the item, or are owned by the item and its children.

Language used for rule validation errors

When documents are processed automatically, rule validation errors are reported by default in the UI language of the Processing Station component (the language selected when ABBYY FlexiCapture was installed). Some operators may prefer error messages in a different language, for example when manual and automatic processing happen in different countries. To use different languages for different operators, create a separate batch type for each language, and set the error-message language in each.
1

Open Batch Types

On the Project Setup Station, click Project → Batch Types.
2

Create or edit a batch type

Create a new batch type, or select an existing one and click Edit.
3

Set the language

On the Verification tab, select Use this language for messages issued during processing, and then choose one of the supported languages: English, Hungarian, Spanish, Chinese Simplified, Korean, German, Polish, Portuguese (Brazilian), Russian, Serbian, French, Czech, or Japanese.
4

Save the changes

Save your changes.
If an operator makes corrections that are immediately re-checked by validation rules, the error messages from those repeat checks appear in the ABBYY FlexiCapture UI language, because that processing is done locally rather than on the Processing Station. This applies to all error messages on desktop stations and to format errors on web stations.
The following error messages are available only in English: errors reported by script rules, document assembly errors, and key field matching errors.