Null Coalescing Operator (??)
The null coalescing operator, accessed via the symbol ??
, returns the value of its left-hand operand when that value is not NULL
, and the value of it's right-hand operand otherwise.
The left-hand operand is evaluated before being being fed to the null coalescing operator. For instance, say that the left-hand operand is defined by an IF function that evaluates to NULL
after being evaluated. The null coalescing operator will return the left-hand operand:
Note that the null coalescing operator does NOT use the same evaluation criteria as the ISEMPTY function to determine if the left-hand operand is "empty". The null coalescing operator returns the right-hand operand if and only if the left-hand operand is NULL
. Empty strings and Lists, for example, are "empty", but not NULL
:
Last updated