Conditional instructions

In rate routine steps, you can specify a conditional in the Instruction field only.

The conditionals are:

  • IF – Begin a conditional instruction. An ENDIF must follow this conditional.
  • ELSEIF – Continue a conditional instruction. An IF must precede this conditional.
  • ELSE – Continue a conditional instruction. An IF must precede this conditional. Can follow ELSEIF.
  • ENDIF – Ends a conditional instruction.

Conditional expressions and operators

In rate routine steps, conditional expressions are available in operands only. A conditional expression returns a Boolean.

A simple conditional expression consists of two operands separated by a comparison. The left operand determines the choices available in the drop-down list for the right operand. In a simple conditional expression, you compare two operands by using the following Comparison operators:

Comparison operator

Description

<

Less than

=

Equal

Not equal

>

Greater than

Less than or equal to

Greater than or equal

IN

The left operand is a member of the set defined by the right operand. You can choose this operator if the left operand is a typekey value.

The right operand choices are limited to a single typekey or a list of typekeys in a typelist.

Both left and right operand can be parameter data, rate table lookup, function, local variable. Left operand can also be a single typekey constant. Right operand can also be a list of constants.

NOT IN

The left operand is not a member of the right operand set. You can choose this operator if the left operand is a typekey value.

The right operand choices are limited to a single typekey or a list of typekeys in a typelist.

Both left and right operand can be parameter data, rate table lookup, function, local variable. Left operand can also be a single typekey constant. Right operand can also be a list of constants.

Examples

An example of a simple conditional expression is:

AdjustedRate ≤ BaseRate

You can create a complex conditional expression by combining two or more conditional expressions separated by AND or OR. For example:

    BaseRate ≠ AdjustedRate 
AND BaseRate > 10

You can add parentheses to the conditional expression. The parentheses must be balanced. For example:

    ( BaseRate ≠ AdjustedRate )
AND ( BaseRate > 10 )