You are here: Setting up the system > Solutions > Invoice profiles and related settings > Expressions for field validation
  Invoice modules

Expressions for field validation

When you set up an invoice solution that uses Invoice modules, you type expressions for validating numerical fields (including barcode fields) in the Validation settings of an invoice field profile.

The table below shows the characters that are valid in those expressions.

Character

Meaning

Example

Arithmetic operators

+

Plus

=FieldA+FieldB

-

Minus

=FieldA-FieldB

:

Sum of fields from/to

<FieldA:FieldB

*

Multiply

>FieldA*10

/

Divide

=FieldA/2 (If both operands are integers, the result is an integer.)

%

Remainder

=FieldA%100 (returns the remainder of FieldA / 100)

Conditional operator

?

Does the field exist?

=?FieldB (returns 1 if the field exists, otherwise 0)

Relational operators

=

Equal to

=100

>

Greater than

>FieldC

<

Less than

<FieldC

>=

Greater than or equal to

FieldA>=FieldB

<=

Less than or equal to

FieldA<=FieldB+FieldC

Logical operator

;

And (between two expressions)

FieldA=FieldB+FieldC; FieldA=FieldD

Other characters

( )

Parentheses

(FieldA+FieldB)*FieldC

There are two types of expressions. For more information, click the one that applies to your situation:

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

Type 2 validates any numerical field in the invoice profile.

Note: 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.

Precision of calculations on values with decimals

Field profiles for invoices: Overview