Your Airkit journey starts here

IF

Use the IF function to do conditional branching.

IF(test_1, value_if_true_1 
    [,[test_2, value_if_true_2, ..., test_n, value_if_true_n,] 
    value_if_false]
) -> result

Parameters

test_1
boolean -The first condition to test.
value_if_true_1
any -The value to be returned if test_1 is TRUE.
test_2
boolean -The condition you want to test next. If test is FALSE, test_2 will be evaluated, otherwise value_if_true_1 will be returned. This parameter is optional, but if it is present, then value_if_true_2 must also be provided
value_if_true_2
any -The value to be returned if test_2 is TRUE.
test_n
boolean -The condition you want to test next. If all previous test parameters are FALSE, test_n will be evaluated, otherwise value_if_true_n will be returned. The IF function supports as many test/value pairs as are needed, but they must be provided in pairs.
value_if_true_n
any -The value to be returned if test_n is TRUE.
value_if_false
any -If no tests are TRUE, the result of the value_if_false parameter is returned. This parameter is opitional, if no value_if_false parameter is provided the result will be NULL.

Return Values

result
any -When one of the test parameters is true, the result will be the corresponding value_if_true parameter. Otherwise the result will be the value_if_false parameter when it is provided, and NULL otherwise.