Alteryx Designer Desktop Discussions

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

Find Replace on first occurance

stefaniadurdan
8 - Asteroid

Hello!

 

I am trying to use Find Replace tool to extract a Category from a mapping file.

The original database contains free text input by the user - it can be different each time.

 

Based on keywords, I am creating a mapping and I have a difficult time when they are interfering and there is a priority in place.

 

This is a sample of the database.

 

Text
Dental feb 23
Dental accrual dec 12
Accrual docs 3452

 

And this is a sample of the Mapping:

 

GroupTextPriority
Accrual / Reversalaccrual1
Allocate/Record Dentaldental2

 

Basically, what I want to highlight is that if the free text contains "Dental" it will go under category Allocate/Record Dental, BUT if it also contains "Accrual" it will go under category Accrual / Reversal. That's why I thought to insert a Priority and sort them based on the Priority.

 

My logic says that when running the workflow, it should work. However, Alteryx is still mapping the text "Dental accrual dec 12" under Allocate/Record Dental instead of Accrual/Reversal.

 

Attached is the workflow that I tried.

 

This is what Alteryx is bringing me:

 

TextGroup
Dental feb 23Allocate/Record Dental
Dental accrual dec 12Allocate/Record Dental
Accrual docs 3452Accrual / Reversal

 

And this is what I want:

 

TextGroup
Dental feb 23Allocate/Record Dental
Dental accrual dec 12Accrual / Reversal
Accrual docs 3452Accrual / Reversal

 

Is there a solution here?

 

Thank you so much!

5 REPLIES 5
BS_THE_ANALYST
14 - Magnetar

@stefaniadurdan I think this could be one approach:

Screenshot 2023-10-31 132155.png

 

Append all possible matches against the data. See if any of the rows contain the possible matches using "contains" formula. Find the lowest priority. Extract that row.

 

Not sure if this is the best route; first thing that came to mind.

 

All the best,

BS

TimN
13 - Pulsar

How about this...

caltang
17 - Castor
17 - Castor

Like so?

 

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

Props to you @stefaniadurdan - you are very clear with your request and you provided your workflow. 

 

Great work @TimN @BS_THE_ANALYST as well - many ways to solve this!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
BS_THE_ANALYST
14 - Magnetar

@caltang nice, split-to-rows and join. Your approach trumps mine as the lookup tables grow! I'd be eager to use this @stefaniadurdan.

Labels