Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Complex If statement, unknown variable

Jon12
6 - Meteoroid

I have the below syntax using the formula tool.  I am getting an 'Unknown Variable "POA" message at the underlined part of the formula.  The data that is feeding into the formula is string type and I have data cleansed to remove whitespace and I have copied the data field in the attached.  Thank you for your help

 

if [STTL_STATUS] = 5 then [STTL_DATE] elseif [STTL_STATUS] = 4 then [STTL_APP_DATE] elseif [STTL_STATUS] = 2 and [STTL_ORDER_SUFFIX] = POA then [STTL_DATE] elseif [STTL_STATUS] = 2 and [STTL_ALREADY_APPLIED] = 1 then [STTL_DATE] else "Unapplied" endif

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@Jon12 you will need to put POA inside quotes, like

[STTL_ORDER_SUFFIX]= "POA"

 Strings require quotes, numbers do not

AngelosPachis
16 - Nebula

Hi @Jon12 ,

 

If POA is a value in the column [STTL_ORDER_SUFFIX], then you should probably wrap it in quote marks assuming that column is of string data type, so

... elseif [STTL_STATUS] = 2 and [STTL_ORDER_SUFFIX] = "POA" then [STTL_DATE] elseif 

 

Cheers,

 

Angelos

Jon12
6 - Meteoroid

I've got it now.  The others needed to be in quotes also since coming from string.  I'm new here so beginner issues. Thank you!!!

Labels