Alteryx Designer Desktop Discussions

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

Formula Tool Returning 0 or -1 instead of String Text based off Conditional If Statement

Jmills040
6 - Meteoroid

I am trying to get the ACTION_REASON_DESCRIPTION field to return Terminated, Retired, or Death, based off the conditional IF Statement Below. The Data Type is V_W String, yet the output is returned as either 0 or -1. I have tried every string data type possible and the output remains 0 or -1. I do not understand why I am getting this output rather than what I specified in my Formula Tool Expression.

 

If StatementIf StatementOutput Field and Data TypeOutput Field and Data TypeWhat is being returnedWhat is being returned

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus
IF 
[Employee_Status] = 'T' THEN 'Terminated'  ELSEIF
[Employee_Status] = 'R' THEN 'Retired'  ELSEIF
[Employee_Status] = 'D' THEN 'Death'  
ELSE
Null()
ENDIF

very close!  You don't need to specify the new variable in the syntax.

 

Thanks,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ashissanpui
9 - Comet

This formula should be written to the specific field. In this particular example, the field name should be [ACTION_REASON_DESCRIPTION].

dipika07011988
6 - Meteoroid

You can specify column name as in the attached image by selecting column drop down and selecting add column

 

dipika07011988_0-1623436788768.png

 

Labels