Print this page

"NULL evaluation / condition on IF statement" AMPScript error

Knowledge Article Number 000213691
Description
An error occurs processing AMPScript stating "NULL evaluation / condition on IF statement."  AMPscript doesn't evaluate for NULL when it's comparing against an attribute.
Resolution

To resolve this, create a variable and set the variable to equal your attribute. 

For example:

 
%%[ var @tempfirstname set @tempfirstname = FIRST_NAME]%% 

Dear %%[IF @tempfirstname == "" or @tempfirstname is NULL THEN]%% Customer, %%[ELSE]%% %%FIRST_NAME%%, %%[ENDIF]%%

 




promote demote