The If function is a built-in function that returns true_return text if value is True, otherwise, it returns false_return text.

Input parameters

value: Boolean Type

true_return: Text Type. You can use an expression that is evaluated at runtime.

false_return: Text Type. You can use an expression that is evaluated at runtime.

If value is true, only true_return is evaluated. If value is false, only false_return is evaluated.

Output parameters

The type of the returned value.

Examples

Usage

Result

If( True, "go", "no go" )

"go"

If( False, "go", "no go" ) "no go"

If( Var=0, 0, 1/Var )

0 when Var is 0

1/Var when Var is different from 0 (returned value is of Decimal type)

If( Var <> "", Var, VarAux )

Var when Var is different from "" (returned value is of Var type)

VarAux when Var is equal to "" (returned value is of VarAux type)

See Also

Available Miscellaneous Functions | Available Built-in Functions