Alteryx Designer Desktop Discussions

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

Conditional Statement with "Contains" or Starts With Instead of "="

alphabex18
8 - Asteroid

Hi there all, 

 

Is it possible to write a conditional statement within the same column that uses a "Contains", "Starts with", "Does not Include" instead of just equals or does not equal?

 

here is what i would like to happen

 

IF [Queue Name] Contains (or starts with) "+1" THEN "External Call"
ELSEIF [Queue Name] Is NULL THEN "Undetermined Call"
ELSE "Internal Call" 
ENDIF

 

If not possible, i know that i can try to use a filter tool to separate them out to additional columns, but i am trying to avoid that 

 

Thanks so much

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

Absolutely!

 

IF Contains([Queue Name], "+1")  THEN "External Call"
ELSEIF IsNull([Queue Name]) THEN "Undetermined Call"
Else "Internal Call"
Endif

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
alphabex18
8 - Asteroid

I appreciate the quick response, however, all the results display "Internal Call" regardless of the type. 

 

FYI - currently the data type selection is V_String, which i changed at the beginning of the workflow from  "Double" (the field contains names or phone numbers). maybe that plays a part in why its not running as expected. 

MarqueeCrew
20 - Arcturus
20 - Arcturus

please show a screen print of you formula configuration.

 

OUTPUT COLUMN = ?

Data Type = ?

 

I tried this and got good results.

 

capture.png

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
alphabex18
8 - Asteroid

it worked. I had to arrange the tool so it came before another formula tool. I think the data types got jumbled along the way. Thank you so much. Still learning IF statements in Alteryx, they can be tricky. 

Labels