Alteryx Designer Desktop Discussions

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

Remove words if certain words in field

emiafshar
8 - Asteroid

Hey guys!

 

I have a field that if the below text is shown, I need to remove the whole sentence. The ID number in between is never the same so it needs to remove the sentence if it starts with Auto closing due to .. and ends with version.

 

emiafshar_0-1616776973226.png

Any ideas?

6 REPLIES 6
messi007
15 - Aurora
15 - Aurora

@emiafshar,

 

Please see below

 

messi007_0-1616777471385.png

 

 

Hope this helps

If this solve the need please mark it as solved, it will help others,

 

Attached the workflow,

Regards

emiafshar
8 - Asteroid

Hey - that deletes the text before and after but not the ID number in between.

 

emiafshar_0-1616778289390.png

 

AngelosPachis
16 - Nebula

Hi @emiafshar ,

 

Can you try the following formula and see if that works for you?

 

AngelosPachis_0-1616787624570.png

 

Regards,

 

Angelos

AngelosPachis
16 - Nebula

Any updates on this @emiafshar ?

emiafshar
8 - Asteroid

Apologies for the delay in getting back to you - the formula didn't work unfortunately. Output is the same as the input.

T_Willins
14 - Magnetar
14 - Magnetar

Hi @emiafshar,  The formula provided was close, but it was missing a non-greedy indicator (?), which works like "until" in this case.  I also added a $ to the end of the find string as this indicates the end of the line being evaluated.  Without the $ record 6 would display the word "version" instead of being blank as the find string would only delete through the first instance of "version" and not the last.  Let us know if this works.

 

Remove words.png

 

Labels