Skip to main content Skip to complementary content

Conditional Expressions

About this task

The IfThen (and IfThenElse) functions are used to make conditional execution of expressions. These function expressions are evaluated the same way as any other type of expression.

The IfThen function has two arguments:

Procedure

  1. Condition - Requires an expression returning a Boolean value. If the result of the Boolean expression is true, the result of the IfThen function expression is the Then expression. If the result is false, the IfThen function expression returns no result.
  2. Then - The expression that provides the value to the IfThen function expression if the condition is true.

Results

The IfThenElse function adds a third Else argument to the IfThen function. The value of the Else argument expression is returned if the condition argument evaluated to false.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!