IF ER function
The IF
function returns the first specified value if the specified condition is met. Otherwise, it returns the second specified value. The value that is returned can be a value of any of the supported data types.
Syntax
IF (condition, first value, second value) as any of the supported data types
Arguments
condition
: Boolean
A valid conditional expression that must be tested.
first value
: Any of the supported data types
The result that is returned if the condition is met.
second value
: Any of the supported data types
The result that is returned if the condition isn't met.
Return values
Any of the supported data types
The resulting value of any of the supported data types.
Usage notes
The first value
and second value
arguments must be specified by using the same data type. An exception is thrown at design time if the data types of the configured values don't match.
If the first value and the second value are values of the Container (record) or Record list data type, the result has only the fields that exist in both values.
Example
IF (1=2, "condition is met", "condition is not met")
returns the string "condition is not met".