Start Free Trial

Alteryx Designer Desktop Discussions

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

Update Conditional Formula via File Input/Mapping Table

nmetier1
5 - Atom
I have a list of identifiers ([Search String]) to search a string field ([Search Field]) to create categories for a customer. I would like to create a mapping document in excel that would generate/update the conditional formula in Alteryx that creates the [Category Name] field.  The  customer periodically has new items they want to add to the list. If I hardcode it in Alteryx, I'll be stuck updating the formula manually every time.  Unfortunately, I can just use the [Category Name] field as a join field as it would be a 1 to many join.
 
I've included a dummy example table below the customer would maintain.
Category NameSearch String
Indoor PlantsAlpha
Outdoor PlantsBeta
Vegetable PlantsGamma

 

The resulting formula field [Line of Business] in Alteryx would look like this:

 

IF Contains([Search Field], "Alpha" THEN "Indoor Plants"
IF Contains([Search Field], "Beta" THEN "Outdoor Plants"
IF Contains([Search Field], "Gamma" THEN "Vegetable Plants"
ELSE "Uncategorized"
ENDIF

 

 

Hope I explained that well!  Has anyone come across a situation like this before? I've hit the wall!!  Thanks in advance 🙂

2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @nmetier1 ,

 

If I understand your question correctly, I think that a Find & Replace tool can help you in this instance. As long as the mapping document gets updated, the find & replace tool will look in any part of the Search field to find the Search string and then it will append the category name.

 

AngelosPachis_0-1626892598356.png

Those that don't find a match will have a null value in the category name column, which you can replace with an uncategorised value with a formula tool.

 

Cheers,

 

Angelos

 

nmetier1
5 - Atom

Thank you so much Angelos!!  Works like a charm 😀

Labels
Top Solution Authors