Does the IsNull AMPscript function actually work?
I'm trying to figure out a scenario where it will actually return true. Here's what I've tried:
Test 1
%%[
var @rows
set @rows = LookupRows("July member promo","Member",1) /* returns 0 rows */
]%%
%%=IsNull(@rows)=%%
Result 1
False
Test 2
%%[ var @rows ]%%
%%=IsNull(@rows)=%%
Result 2
False
Test 3
Surely this must work as AttributeValue will return null if the attribute does not exist...
%%[
var @field
set @field = AttributeValue("a field that does not exist")
]%%
%%=IsNull(@field)=%%
Result 3
False
IsNull versus Empty
And while I'm on the topic, if this function does actually return a correct result, then what's the difference between it and the Empty function? The Empty function returns to True if the expression is null or empty:
%%[
var @field
set @field = AttributeValue("a field that does not exist")
]%%
%%=Empty(@field)=%%