Check Sum rule

This rule is used to check the sum of values of several fields. The sum of values of specific fields is compared against a preset number or the value in a different field. For example, if your document contains fields with a salary amount, bonus amount, other compensation payments, and a sum total field, you can configure a rule that will check whether the sum of field values matches the sum total in the resulting field. An error message will be displayed in case of a mismatch.

Note: When applying this rule to a field of a Table type, the calculation depends on the level at which the rule was created. If you need to compare the sum of values of all cells of a table column with a calculated or given number, the rule must be created in the Document Definition Properties or in the document section properties. If you need to compare each cell of a column or the sum of all cells of a few table columns with a calculated or given number, the rule must be created in the table properties or in the table column properties.

These direction should also be followed when creating a rule that checks the sum of values for fields with a few instances.

To create a sum check rule, proceed as follows:

  1. Open the field properties dialog box (right-click the field to open its shortcut menu and select Properties...) or the Document Definition properties dialog box (from the Document Definition editor menu, select Document Definition → Document Definition Properties...).
  2. Go to the Rules tab.
  3. Click the New Rule... button.
  4. From the list of rule types, select Check Sum and click OK.
  5. Type the name of the rule.
  6. Disable the Show rule name in message to verifier option if necessary. If this option is disabled, the error message will be displayed as "error message" instead of "name of rule: error message".
  7. Specify the severity of the rule.
  8. If required, specify the conditions under which the rule must be applied (by default, a rule is applied unconditionally). See Conditions for applying rules for more information.
  9. Specify tags for the rule.
  10. Disable the Enabled rule option if necessary. The rule will be created, but will not be applied until this option is enabled by a user.
  11. Click Next >.
  12. In the dialog box that opens, add to the list Summarize values of fields the fields the sum of whose values you want to check. Use the Add... button to add fields.
  13. Enable one of the options:
    • field to compare the sum with the value of the resulting field. Select the name of this field using the Select... button.
    • number to compare the sum with the specified number. Enter this number.
  14. Precision is the maximum permitted difference between the values of fields for which the rule is set up. A rule is considered to be satisfied when the absolute value of the difference between the values is less than or equal to the specified precision value. If it is not, the rule is not considered to be satisfied and an error message is generated..
  15. Enable the option At least two non-empty objects required if you want at least two non-empty and non-zero summands to be used. If this condition is not met, the rule will return an error.
  16. Confirm fields if rule check is successful If this option is enabled, the field values that pass rule validation will be automatically confirmed in the Document Definition editor. Otherwise, the Verification Operator will have to confirm field values manually.
  17. Click Finish to complete creating the rule. The name of the rule will be shown on the Rules tab.

12.04.2024 18:16:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.