Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Expression to Evaluate NULL Conditions

WayneWooldridge
Alteryx Alumni (Retired)
Created

When writing expressions that evaluate NULL conditions, it is a common mistake to write the syntax as:

IF [FieldX] = NULL() THEN ...

 

After all, this is how you would write the expression in SQL.  However, the actual syntax needs to be:

IF ISNULL([FieldX]) THEN ....

 

Keep writing those expressions!

Comments
Tamashiro
5 - Atom

Hello,

 

Isnull([Field_X]) == 1 for TRUE statements

or

Isnull([Fielx X]) != -1  for FALSE statements

are valid expressions?

Thanks,

Leonardo

WayneWooldridge
Alteryx Alumni (Retired)

No, that expression will not work.   You can use the expression ISNULL(Field1) and setup a Flag field as BOOL data type which will will give a True/False response or as an INT32 will give you a -1 (for True) or 0 (for False):

 

ISNULL.png