Data Transformation Engine Type Designer Reference Guide
Chapter 8 - Components Defining Component Rules
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)
Component Rule Syntax
A component rule is a complete expression that evaluates to either TRUE or
FALSE. It may contain functions (for example,
PRESENT, COUNT, and SUM). It may
contain arithmetic operators (for example, - + / *).
Note A component rule is a statement, so it does not start with an equal sign.
For more information on the syntax of expressions, see the Functions and
Expressions Reference Guide.
Entering Object Names in Component Rules
A component rule may refer to a component within a component. The syntax for a
component is the component name, followed by a colon (
:), followed by the
object of which the component is a part. Whenever you see the colon (
:) in an
expression, it can be interpreted as "component of" or simply "of".