Examples of component rules

A component rule can limit the acceptable values of a component as shown in the following example:

Quantity < 10000
Interest Rate > .13 & Interest Rate < .20
WHEN (PurposeCode != "PF", ShipValue = 200|ShipCode < 0)

The following example illustrates how a component rule can make the presence of one component mandatory, if another component is present:

WHEN (PRESENT (Address Field), PRESENT (Qualifier Field))
WHEN (PRESENT (PhoneNumber), PRESENT (AreaCode), ABSENT (AreaCode))

A component rule can compare a component to the result of an arithmetic operation as shown in the following example:

SUM (((QuantityOrdered:Item Record:Detail) = TotalQuantity:Summary Record:Detail
Account Balance = Credits - Debits
Extension = Quantity*Price
#Items Field = COUNT (Item Record IN Invoice)