Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Mapping Rule Help

Samowens30
7 - Meteor

Hey Alteryx Heroes,

 

i am stuck on a workflow and could use some inspiration. I am using find and replace append to select a brand from a cell description and input into a brand column.

 

ie 

“xyzApple56z” = Apple

“ZMicrosoft67dd” = Microsoft 

etc.

 

This works perfectly until there is two brands in a description. If it says “Apple & Microsoft” in the description, i want it to say “Mix”. However, in the rules table where it scans for the words within the cell, it just see’s Apple so stops reading further and only selects this one.

 

Any ideas how I can get it to select mix instead? It can even be a new part of the workflow where it overwrites the errors made in the find replace.

 

thanks in advance!!


Sam

14 REPLIES 14
atcodedog05
22 - Nova
22 - Nova

Hi @Samowens30 

 

You can try to match composite contain to map "Mix". Make sure mix conditions always comes first.

atcodedog05_0-1606746713461.png

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

PhilipMannering
16 - Nebula
16 - Nebula

Will a mix always include an ampersand? I'm guessing it's as if contains ampersand then "Mix"?

PhilipMannering
16 - Nebula
16 - Nebula

@atcodedog05 What happens when you have a thousand companies?

atcodedog05
22 - Nova
22 - Nova

@PhilipMannering 

 

Well this scenario is not for thousand companies. This more like for 5 or 6 categories.

 

1000 companies would be different scenario  😅

Samowens30
7 - Meteor

This definitely is a fix on the example I gave, the problem is it needs to be scaled up as there are so many different combinations. Is there a way to do this for 100-200 potential IFs? Or is it a workflow with a few hundred IF statements? The latter would not be too ideal

 

Thank you for your help!!

PhilipMannering
16 - Nebula
16 - Nebula

Hey @Samowens30 

 

Try this,

PhilipMannering_0-1606747269007.png

 

Samowens30
7 - Meteor

Nope, there is no other common denominator other than the words themselves. Could be
"AppleMicrosoft"

"AppleHateMicrosoft"

"MicrosoftEatsApple"

 

etc 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @Samowens30 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1606747669900.png

Workflow:

atcodedog05_1-1606747686880.png

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @PhilipMannering 

 

even thought similar to you but i used Replace remove the first search and go for 2 search then using ReverseString()😅

 

Interesting approach with ReverseString()🙂

Labels