Railo 4.2 Reference
Choose a function:

Function IIF

Evaluates a Boolean conditional dynamic expression. Depending
on whether the expression is true or false, dynamically
evaluates one of two string expressions and returns the result.

Beispiel

iif(boolean condition,string string_expression1,string string_expression2):any

Argumente

Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.
Name Typ Required Beschreibung
condition boolean  Yes An expression that can be evaluated as a Boolean.  
string_expression1 string  Yes Expression to evaluate and return if condition is true.  
string_expression2 string  Yes Expression to evaluate and return if condition is false.