Functions - If


Returns one of two values based on a Boolean.

Syntax

If(criterion, first, second)

Parameters

criterionThe criterion being evaluated.
firstThe result if criterion is True.
secondThe result if criterion is False.

Notes

The criterion parameter must be a Boolean, and the two parameters first and second must be of the same type.

Example

This expression part evaluates to 123:

If(True, 123, 456)