not operator can be used to reverse the logic of a Boolean evaluation.
%%[ var @statusTier, @amount, @freeShipping set @statusTier = "Gold" set @amount = 125 if @statusTier == "Gold" and not @amount > 100 then set @freeShipping = true endif ]%% <p>You %%=Iif(@freeShipping == true, "qualify","do not qualify")=%% for free shipping.</p>
In the above example, the logic evaluation of the second expression is reversed, so the following output will be displayed:
<p>You not qualify for free shipping.</p>
not operator can also be used to reverse the evaluation of an AMPscript function:
<p>Dear %%=Iif(not Empty(FirstName), FirstName, "Member")=%%,</p>
In this example, if the ‘FirstName’ attribute is not empty, then the attribute will be displayed; otherwise the constant value ‘Member’ will be displayed: