Skip to main content

Overview

This function returns one of two values based on a boolean condition. It evaluates the boolean variable and returns the first value if true, or the second value if false.

Parameters

conditional(booleanVariable, value1, value2)
  • Boolean Variable: The boolean condition to evaluate.
  • Value 1: The value returned if the condition is true.
  • Value 2: The value returned if the condition is false.

Example

conditional(#isLoggedIn, "Welcome back!", "Please log in")
Returns “Welcome back!” if isLoggedIn is true, otherwise returns “Please log in”.
I