We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

Using 'IN' within a Contains function?

aMac
8 - Asteroid

I'll start off by saying I LOVE that Alteryx allows for the use of IN within tools like the Filter!

 

HOWEVER, I am trying to evaluate if a dataset of large string fields contains 8 Ids and I'd rather not write 8 lines of 'contains' statements- is there a trick formula for filtering n-number values within a larger string field equivalent to something like:

 

Contains([Field], IN ("val1","val2","val3",val4", etc)?

 

 

13 REPLIES 13
MGT
6 - Meteoroid

Hi

I have a list of entities, I would like to identify the transaction booked within a list of entities. My formula is as follows, but I ma getting error. Can you help me figure out why?

Regex_countmatches([ETYBRCON], "I602|4352|4354|4359|4360|4392|9234|B658|I430|4404|4407”)

MarqueeCrew
20 - Arcturus
20 - Arcturus

Regex_countmatches(ToString([ETYBRCON]), "I602|4352|4354|4359|4360|4392|9234|B658|I430|4404|4407”)

 

maybe the data type is not string?  That's a guess...

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MGT
6 - Meteoroid

Data type is V_String, the error I get is Unmatched Quote

bb213
8 - Asteroid

can you PLEASE update this macro with an option to let all records pass through if no search terms are specified?  Thanks. 

Labels