Operators and Expressions

You can use operators in an input cell to modify a value. For example, the value in the first cell of the following image represents any value less than 75. This document details each operator you can use in your decision table.

Screenshot of decision table with an input cell containing "<75"

Expression Builder

The expression builder helps you select operators to form logical expressions, instead of typing out the logical operators. Double-click on a cell to open the expression builder. Inside the expression builder, you can select an operator to view its description and syntax, or double-click on an operator to include it in your expression. Use the right and left arrows next to the Expression field to navigate between cells.

Screenshot of expression builder

List of Operators

This section summarizes the different types of operators available in decision tables.

Note: Typically, in order to use operators with text values, you must select the input type to be Advanced String. The only operator you can use with a Text input type is the Not operator.

Boolean Operators

The Not operator returns the opposite of the original value.

Example: In the following table, Not("Decision") represents values that are not the text Decision. Not(2018-02-01) represents date values that are not February 1, 2018. Note that the value that is negated must be enclosed in quote marks for advanced strings, but not for other input types.

Screenshot of decision table showing NOT operator

Numerical Comparison Operators

These operators represent a type of inequality for numerical values. You can express the following:

  • Less than ("<")
  • Greater than (">")
  • Less than or equal to ("<=")
  • Greater than or equal to (">=").

Example: The value in the first cell of the following image represents any value less than 5, the second any value less than or equal to 5, and the third any value greater than or equal to 5.

Screenshot of decision table using numerical comparisons

Range Operators

These operators represent a bounded range of number values. A "[" or "]" indicates that the end value is included, and a "(" or ")" indicates that the end value is excluded.

For example, in the following table:

  • [3, 10) represents any numbers that are both less than 10 and greater than or equal to 3.
  • (11, 15] represents any numbers that are both more than 11 and smaller than or equal to 15.
  • (0, 3) represents any numbers that are both more than 0 and less than 3.
  • [10,11] represents any numbers between 10 and 11, including 10 and 11 themselves.

Screenshot of decision table using range operators.

Step Operators

These operators combine with range operators to count up or down from the first specified value by a factor of a number.

In the following example:

  • [3, 10) @ 2 represents the integers 3, 5, 7, and 9.
  • >=10 @ 2 represents the integers 10, 12, 14, and so on until infinity.
  • <1 @ -2 represents the integers -1, -3, -5 and so on.

shows sample decision table using step operators.

List Operators

Within a list, a comma is separates multiple sub-expressions. A list expression is matched when the value matches any of the sub-expressions in the list. The example below shows how to use numerical inputs in lists, but you use the list operator in all data types except Text. To use list operators to represent multiple possible text values, use the Advanced String input type.

Example: The list value "1, 2, 3" in the first input cell of the following image represents numbers 1, 2, and 3, while "100, [2, 10]@3, [-3, -2]" in the second input cell represents 100, 2, 5, 8, and any number from -3 to -2, including -3 and -2.

screenshot of decision table containing list operators