The IIf function is a simplified version of the IF statement. If the statement is true, return the first value. But if it is false, then return the second value.
Example:
%%[
set @variable = “Hello”
]%%
%%=IIf(EMPTY(@variable),”Variable is empty”, “Variable is not empty”)=%%
Output:
Variable is not empty
Explanation:
We hardcoded the @variable value as “Hello” so it is not empty. The result will show the 2nd parameter of “Variable is not empty”