Selection Criterion Specification

You can use mathematical operators to perform addition, subtraction, multiplication, and/or division between two or more fields.

You can then use the result of these operations for comparison purposes.

You can mix the different mathematical operators (+, -, *, /) in a single expression, and there are no restrictions to the number of fields you can use in an expression.

However, the functionality still has some limitations. Specifically:

  • If you specify a math operator on a line, you can only fill out the Table Section, Operand and Field Name, Operand fields. All other fields must be left blank.
  • All fields used in an expression must be of the same type (for example, Amount).
  • When using math operators, only Integer, Amount, and Real field types are supported.
  • Any line with a specified math operator must always have a line above it.
  • You cannot delete a line that is followed by a line with a specified math operator. You can only do this if the line for deletion has another line above it which meets the following criteria:
    • The Table Section, Operand and Field Name, Operand fields are filled out.
    • The line is of the same type as the one with the math operator.
  • The rule for the normal order of operations applies (that is, multiplication and division are performed before addition and subtraction). You cannot use parentheses to change the order of operations.

To understand how it works, refer to the example in the following table:

Outer Logical Op. Table Section Field Name Inner Logical Op. Operator Value 1 Value 2 Math Operator Table Section, Operand Field Name, Operand
Expense Sheet Line Amount, Base Outside Margin 10 5% Purchase Order Line Price, Base
- Purchase Order Line Invoiced, Base

Value 1 represents fixed value, while Value 2 represents percentage value. You can specify both, and both are taken into account during evaluation.

For fixed value, this is translated to:

For percentage value, this is translated to:

If the “Above or Equal to Margin” operator is used in the preceding example, it is translated to:

For fixed value:

For percentage value:

If the “Below or Equal to Margin” operator is used in the preceding example, it is translated to:

For fixed value:

For percentage value: