Logical functions

You can use logical functions in a formula to return true or false.

Table 1: Logical functions

Function

Syntax

Description

IsNotNull(obj)

obj: User object (column)

Returns a Boolean value that indicates whether a supplied field does not contain a null value. When a field contains a null value, the function returns false. For all other values, the function returns true.

IsNull(obj)

obj: User object (column)

Returns a Boolean value that indicates whether the supplied field contains a null value. When a field contains a null value, the function returns true. For all other values, the function returns false.

<left> and <right>

  • left: Left operand
  • right: Right operand

Returns the logical conjunction of its Boolean inputs. This function returns false: true and false.

<left> or <right>

  • left: Left operand
  • right: Right operand

Returns the logical disjunction of its Boolean inputs. This function returns true: true or false.

if<cond> then <alt1> else <alt2>

  • cond: Boolean condition to test
  • alt1: Alternative 1
  • alt2: Alternative 2

Chooses between two alternatives, based on a Boolean condition. The second alternative is optional and evaluates to null when missing.

<testExpr> in <candidateList>

  • testExpr: Expression to be tested
  • candidateList: List of match candidates

Use to determine whether a first input matches a value in a second input list.

For example:
3 in [2, 4, 6]
returns false

not<bool>

bool: A Boolean

Use to negate a Boolean input.

For example:
not false
returns true
Table 2: Example of the <left> and <right> function

Left

Right

Result of {Left} and {Right}

True

True

true

True

False

false

False

True

false

False

False

false

This function returns false: true and false.
Table 3: Example of <left> or <right> function
Left Right Result of {Left} or {Right}
True True true
True False true
False True true
False False false
This function returns true: true or false.