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.
%%[ set @variable = “Hello” ]%% %%=IIf(EMPTY(@variable),”Variable is empty”, “Variable is not empty”)=%%
Variable is not empty
We hardcoded the @variable value as “Hello” so it is not empty. The result will show the 2nd parameter of “Variable is not empty”