Attribute comparison with deviation (%)

Use this comparison to compare values of two document attributes that are selected for monitoring. You can compare attributes from the same document or from different documents. The attributes must have the same data type.

Use this type of comparison to allow a specific deviation percentage between the two attribute values. For example, you can create a condition that evaluates to True if amount A deviates more than 5 % from amount B.

This table shows the syntax of the attribute comparison with deviation (%) condition type:

Syntax [Validate][Deviation percentage][From]
Validate One of the document attributes selected for monitoring. The attribute can be of type Integer or Decimal.

This is the value to be verified.

Deviation percentage A percentage (between 1% and 99%) that is calculated from Attribute 2.
From One of the document Attributes selected for monitoring. The attribute is of the same type as Attribute 1.

This is the value used as reference.

Evaluation First, the allowed deviation is calculated as:

D=(Deviation% / 100) * Attribute2

Then Event Management verifies whether the value of Attribute 1 is less than the allowed deviation (Attribute 1 < Attribute 2 - D) or greater than the allowed deviation (Attribute 1 > Attribute 2 + D).

The evaluation result is True or False.

Example

You build a condition to verify that each discount given for a Sales Order Line deviates more than two percent from the standard discount on the sales order header.

This table shows the condition:

Validate (Attribute 1) LineDiscount
Deviates (Deviation%) 2%
From (Attribute 2) HeaderDiscount

The condition evaluates to true for the values beyond the deviation percentage.

This diagram shows these values as a bold line.

Attribute comparison with deviation diagram