Expressions: Type 2

In the Expression box in the Invoice validation group box you type an expression for validation of a numerical field .

There are two types of expressions.

Type 1 validates the current field in relation to other fields.

Type 2 validates any numerical field in the invoice profile. Type 2 is a field name or arithmetic expression, followed by a relational operator, followed by another field name or arithmetic expression. Names all the fields involved in the validation.


FieldA+FieldB>3*FieldC The sum of FieldA and FieldB must be greater than 3 times the value of FieldC
FieldA+FieldB>FieldC The sum of FieldA and FieldB must be greater than the value of FieldC

Type 1 expressions can always be rewritten as type 2 expressions. For example, these two expressions mean the same thing (assuming the current field is FieldA):

Type 1: =FieldB+FieldC

Type 2: FieldA=FieldB+FieldC

If the current field is non-numeric, the expression must be type 2 and validate another field, because non-numeric fields cannot be validated by an expression. Furthermore, when you use a semicolon as the AND operator, the expression must always be type 2.