Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

String exact contains(Used contain formula but not working)

j395liu
5 - Atom

I'm trying to build a workflow that have three columns as input (Column A, Column B and a search value) and output the result as the value in 'Desired Output' column. Basically search the target for example "ABC" in a list of strings "ABC","ABC22","3sABC" and only return 1 match result "ABC". 

j395liu_1-1605817605067.png

 

I used formula tool in Alteryx with function Contains but in my cases above, the result is the target is contained in both A value and B value. I can't use filter because I've a list of different Search Target value in my real dataset. 

 

Thank you for your help in advance. Any ideas for how to build this workflow would be helpful.

 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@j395liu ,

 

Here's a helpful hint:

 

REGEX_Match([A], ".*\b"+[c]+"\b.*",0)

 

This will match DEF with 123 DEF Street, but not 123 DEf Road or 123 cDEFg ct).  Using this within an expression that checks column C against A with B, you should get your result.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
j395liu
5 - Atom

This is exactly what I'm looking for. I appreciate your help.😀

MarqueeCrew
20 - Arcturus
20 - Arcturus

You're welcome!   Lots of folks should get help from your post in the future. 

cheers

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels