IF
Returns one value if a logical expression is TRUE and another if it is FALSE.
Usage examples
-
IF(true, 'YES', 'NO') -
IF(GET(UserId) == 1, 100, 200)
Syntax
IF ( logical_expression, value_if_true, [ value_if_false ] )
-
logical_expression- An expression that represents some logical value. -
value_if_true- The value the function returns if logical_expression is TRUE. -
value_if_false- The value the function returns if logical_expression is FALSE.
Returns
any - The value of value_if_true or value_if_false.