Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!

Alteryx Designer Discussions

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

Extracting specific strings from columns

mokawner
7 - Meteor

Hi all,

I am trying to extract the word "SAFE" from the [SECURITYOFFEREDOTHERDESC] where possible, and replace the word "Other" with it in the [SECURITYOFFEREDTYPE]

There are may different ways that "SAFE" is represented - some capitalized, some not, some spelled out, and some not. Is there a way I can do this in Alteryx? \

Thanks in advance!

-Matt

Screenshot (39).png

6 REPLIES 6
grazitti_sapna
17 - Castor

Hi @mokawner , is this something you are looking for? This can be achieved using Find and Replace tool.

 

Input

grazitti_sapna_0-1652376637916.png

 

Output

 

grazitti_sapna_0-1652376566942.png

 

Thanks.

Sapna Gupta
gabrielvilella
14 - Magnetar

I do not know what are all the variants of SAFE you have there. Based on the screenshot this should work to locate those occurrences:

 

Contains([Field1],"safe")
OR
Contains([Field1],"simple agreement")

 

 

mokawner
7 - Meteor

Thank you so much @gabrielvilella and @grazitti_sapna !! You guys are awesome.

lynnekilgore
7 - Meteor

@gabrielvilella this is very helpful, but wondering if you could expand this a bit. The attached file has multiple columns, but I am only concerned with Primary Address. The goal is to find the state abbreviation and pull it out/place it in a separate column. At first, I thought I could use the formula tool and the IF-ELSE-THEN statement, but that didn't work for me (read: I was only able to pull out a single state, not multiple). Advice on the best way to accomplish this would be very helpful. Thank you!

gabrielvilella
14 - Magnetar

@lynnekilgore the best option for you is the Find and Replace. Create a table (can be a simple Text Input) with all the state abbreviations. Find that field on the address field of the other table, check the options to Append Field and select the state abbreviation field. 

lynnekilgore
7 - Meteor

This worked! So simple, kicking myself for not realizing this was the answer. Thank you so very much.

Labels