Conditional Statements

These functions select an expression to return depending on a conditional expression.

Function Syntax Description
if() if (bool expr, expr1, expr2) Test for a condition, returning one of two values
case() case(. . ., bool exprN, resultN, else) Test for a condition, returning one of two or more values
decode() decode(field, caseValue, thenValue, elseValue) Test for a condition, returning one of two or more values
caseContains() caseContains(string field, string caseValue, string thenValue, ..., string elseValue) Test for a condition, returning one of two or more string values
caseContains() caseContains(string field, boolean caseSensitive, string caseValue, string thenValue, ..., string elseValue) Test for a condition, returning one of two or more case sensitive string values