Skip to main content

Logical

AND

​​✔️ Safe to use in filter queries

Checks whether all arguments are true, and returns true if all arguments evaluate to true. In addition to a false boolean value, AND evaluates as false the following: 0, null, undefined values, empty text/strings. The AND function evaluates all other values as true, including non-zero numeric values and arrays.

Syntax

AND(expression1, expression2, ...)

NameTypeDescription
expression1mandatoryexpression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false.
expression2optionalexpression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false.

COMPARE

​​✔️ Safe to use in filter queries

Compares two values and returns -1 if the first value is less than the second, 1 if the first value is greater than the second, and 0 if the two values are equivalent. COMPARE also checks the data types of the input arguments and requires two input arguments to have the same data type.

Syntax

COMPARE(expression1, expression2)

NameTypeDescription
expression1mandatoryThe first value expression for comparison. Can be any expression that evaluates to integer, date & time, decimal, text, or boolean value.
expression2mandatoryThe second value expression for comparison. Can be any expression that evaluates to integer, date & time, decimal, text, or boolean value.

EXISTS

​​✔️ Safe to use in filter queries

Evaluates the expression and returns true if the expression evaluates to a value and false if not. Even the evaluated expression evaluates to false, 0, or an empty string, exists returns true. Exists returns false only if the evaluated expression results in an undefined or missing (null) value.

Syntax

EXISTS(expression)

NameTypeDescription
expressionmandatoryThe expression and its result to check for existence. Can be an expression that returns any data type.

FALSE

​​✔️ Safe to use in filter queries

Returns the boolean value false.

Syntax

FALSE()

IF

​​✔️ Safe to use in filter queries

Checks whether a condition is met, and returns one value if true, and another value if false.

Syntax

IF(expression, true_case, false_case)

NameTypeDescription
expressionmandatoryCan be any value or expression that can be evaluated as true or false.
true_casemandatoryThe value that is returned if the expression evaluates to true.
false_casemandatoryThe value that is returned if the expression evaluates to false.

IFBLANK

​​✔️ Safe to use in filter queries

Evaluates an expression and returns the value of the expression if the expression evaluates to a non-blank value. If the expression evaluates to a blank value, including instances of undefined values or missing (null) fields, returns the value of the replacement expression.

Syntax

IFBLANK(expression, replacement_expression)

NameTypeDescription
expressionmandatoryThe expression and its result to check for existence. Can be an expression that returns either a text value or an object.
replacement_expressionmandatoryThe expression and its result to use in case the expression evaluates to a blank value. Can be any expression that returns either a text value or an object.

IFS

​​✔️ Safe to use in filter queries

Evaluates a series of case expressions. When it finds an expression that evaluates to true, IFS executes and returns the value of the corresponding "then" expression. If no case evaluates to true then, IFS returns the value of the default expression.

Syntax

IFS(case1, then1, case2, then2, ..., default)

NameTypeDescription
case1mandatoryCan be any valid expression that resolves to a boolean
then1mandatoryCan be any valid expression. The value of this expression is returned if the corresponding case expression evaluates to true.
case2optionalCan be any valid expression that resolves to a boolean.
then2optionalCan be any valid expression. The value of this expression is returned if the corresponding case expression evaluates to true.
defaultmandatoryThe value to return if no case expression evaluates to true.

NOT

​​✔️ Safe to use in filter queries

Evaluates a boolean expression and returns the opposite boolean value; i.e. when passed an expression that evaluates to true, NOT returns false; when passed an expression that evaluates to false, NOT returns true.

Syntax

NOT(expression)

NameTypeDescription
expressionmandatoryCan be any expression or value that can be evaluated as true or false.

OR

​​✔️ Safe to use in filter queries

Evaluates one or more expressions and returns true if any of the expressions are true. Otherwise, OR returns false. In addition to a false boolean value, OR evaluates as false the following: 0, null, undefined values, empty text/strings. The OR function evaluates all other values as true, including non-zero numeric values and arrays.

Syntax

OR(expression1, expression2, ...)

NameTypeDescription
expression1mandatoryexpression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false.
expression2optionalexpression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false.

SWITCH

​❌ Cannot be used in filter queries

Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, the default value is returned.

Syntax

SWITCH(main_expression, value1, result1, value2, result2, ..., default)

NameTypeDescription
main_expressionmandatoryThe main expression to be evaluated.
value1mandatoryThe value of the first branch to check against the main expression value.
result1mandatoryCan be any valid expression. The value of this expression is returned if the corresponding branch value expression evaluates to the same value of the main expression.
value2optionalThe value of the second branch to check against the main expression value.
result2optionalCan be any valid expression. The value of this expression is returned if the corresponding branch value expression evaluates to the same value of the main expression.
defaultmandatoryThe value to return if no branch values match the value of the main expression.

TRUE

​​✔️ Safe to use in filter queries

Returns the boolean value true.

Syntax

TRUE()