Alteryx Designer Desktop Discussions

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

Return Text after 3rd Underscore in Field

cking6178
8 - Asteroid

Looking for help with returning the name after the third underscore in a field. The challenge (for me anyway) is not all the records have 3 underscores and the leading characters vary in length and pattern. Can't share the data for confidentiality reasons, but below is an example:

 

Record 1: APP_Admin_Sales_Name

Record 2: IUser_ReadOnly_Marketing

Record 3: PUser_EDIT_Finance_Name

Record 4: PUser_ReadOnly_Finance

Record 5: IUser_EDIT_Marketing_Name

 

That is the basic structure (Role_Permission_Group_Name) - the first three are required, but Name isn't. But if name is there, I want to isolate it.

 

I can solve using RegEx Replace, but the challenge is there are 17 different groups to test for, so that's a lot of cascaded RegEx tools.

 

Any help is much appreciated.

 

2 REPLIES 2
ggruccio
ACE Emeritus
ACE Emeritus

@cking6178,

 

This may be a simple of a way of looking at it....try the Text to Columns tool using _ as a delimiter.  If something shows up in the fourth column it will be the Name.

 

ggruccio_0-1589567233057.png

ggruccio_1-1589567276661.pngggruccio_2-1589567305643.png

 

 

 

cking6178
8 - Asteroid

@ggruccio 

 

Perfect thanks - and so simple! I was making it harder than necessary.

Labels