Alteryx Designer Desktop Discussions

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

Parse out specific words from a column

Anantv
6 - Meteoroid

Greetings:

I have a column with error messages (Message). I need to pick particular phase and add it to a new column (Error).

 

I tried using RedEx Tokenize - \w missing an as-built - the output looks like "s missing an as-built" which picks up letter "s" from previous word.

 

Also, I am not able to pick up "open commitment" from the next row. Should I be using another RegEx tool?

  

MessageError
123 is missing an as-built. This rule checks whether an as-built exists for a work order. missing as-built
546 has open commitment This rule tests whether an open commitment exists. open commitment

 

Appreciate your assistance.

 

Regards

Viji

4 REPLIES 4
BenMoss
ACE Emeritus
ACE Emeritus

If you are happy to write the different criteria then you could use a contains statement...

 

if contains([Message],"missing as-built") then "missing as-built"

elseif contains[Message],"open commitment" then "open commitment"

else "No error" endif

 

Alternatively, check out this post too: https://community.alteryx.com/t5/Data-Preparation-Blending/Using-IN-within-a-Contains-function/td-p/...

 

If this doesn't work perhaps I'm missunderstanding what you are trying to acheive :)

 

Ben

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Anantv,

 

I have a macro in the gallery that allows you to put multiple "contains" arguments as an in-list option.

 

https://gallery.alteryx.com/#!app/Contains-In-List/5a5903fda18e9e2508e5ae0d

 

Try that and see if it fits your need.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Anantv
6 - Meteoroid

Thank you, BenMoss. If Contains worked for me. 

 

 

Anantv
6 - Meteoroid

Thank you, MarqueeCrew. Downloaded your macro to try it out.

Labels