Operators

The operators you can use in expressions are listed in the following tables, in order of precedence.

Some operators can be selected from the Operators list in the Advanced Editor, while other operators can only be typed in manually. When you select an operator from the Operators list, a Function window opens in which you can construct the statement around the operator.

The operators fall into two categories: Comparison and Logical. The operators in the following tables can be selected in the Operators list or typed in manually.

Comparison Operators

Name in Operators Menu

Operator in Syntax

Description

=

<input> = <value>

Returns true if operands are equal.

>

<input> > <value>

Returns true if first operand is greater than second operand.

>=

<input> >= <value>

Returns true if first operand is greater than or equal to second operand.

<

<input> < <value>

Returns true if first operand is less than second operand.

<=

<input> <= <value>

Returns true if first operand is less than or equal to second operand.

!=

<input> != <value>

Returns true if operands are not equal.

Logical Operators

Name in Operators Menu

Operator in Syntax

Description

and

<input> AND <value>

Returns the logical AND operation for the two operands.

in

<input> IN (<value>)

Returns true if the input field is among the list of values specified.

is not null

<input> IS NOT NULL

Returns true if the input field is not NULL.

is null

<input> IS NULL

Returns true if the input field is NULL.

not

NOT <input>

Returns the logical NOT operation for the operand.

not in

<input> NOT IN (<value>)

Returns true if the input field is not among the list of values specified.

or

<input> OR <value>
						

Returns the logical OR operation for the two operands.

You can use a comparison in the following ways:

  • In an expression as a condition. For example:

      if ($x > 1 and $x <10) begin return true; end
  • As a condition of the IF block.

The following examples illustrate valid comparison expression syntax:

expression = expression
expression != expression
expression < expression
expression > expression
expression <= expression
expression >= expression
expression IS NULL
expression IS NOT NULL
expression IN (expression list)
expression IN domain
expression LIKE constant
expression NOT LIKE constant

NOT (any of the above comparisons). For example NOT ($x IN (1,2,3))

comparison OR comparison
comparison AND comparison

Note that the following syntax is not valid:

$x NOT IN (1,2,3)
EXIST or NOT EXIST 

The operators in the following table can only be typed in manually.

Arithmetic and logical operators

Operator in Syntax

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

||

Concatenate

%

Return the remainder when one number is divided by another