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, ...)
Name | Type | Description |
---|---|---|
expression1 | mandatory | expression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false. |
expression2 | optional | expression1, 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)
Name | Type | Description |
---|---|---|
expression1 | mandatory | The first value expression for comparison. Can be any expression that evaluates to integer, date & time, decimal, text, or boolean value. |
expression2 | mandatory | The 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)
Name | Type | Description |
---|---|---|
expression | mandatory | The 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)
Name | Type | Description |
---|---|---|
expression | mandatory | Can be any value or expression that can be evaluated as true or false. |
true_case | mandatory | The value that is returned if the expression evaluates to true. |
false_case | mandatory | The 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)
Name | Type | Description |
---|---|---|
expression | mandatory | The expression and its result to check for existence. Can be an expression that returns either a text value or an object. |
replacement_expression | mandatory | The 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)
Name | Type | Description |
---|---|---|
case1 | mandatory | Can be any valid expression that resolves to a boolean |
then1 | mandatory | Can be any valid expression. The value of this expression is returned if the corresponding case expression evaluates to true. |
case2 | optional | Can be any valid expression that resolves to a boolean. |
then2 | optional | Can be any valid expression. The value of this expression is returned if the corresponding case expression evaluates to true. |
default | mandatory | The 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)
Name | Type | Description |
---|---|---|
expression | mandatory | Can 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, ...)
Name | Type | Description |
---|---|---|
expression1 | mandatory | expression1, expression2, ... are 1 to 100 boolean expressions to test that can be either true or false. |
expression2 | optional | expression1, 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)
Name | Type | Description |
---|---|---|
main_expression | mandatory | The main expression to be evaluated. |
value1 | mandatory | The value of the first branch to check against the main expression value. |
result1 | mandatory | Can 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. |
value2 | optional | The value of the second branch to check against the main expression value. |
result2 | optional | Can 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. |
default | mandatory | The 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()