Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Question on how to write function to filter key words with capitalized letters

apoptoticbody
7 - Meteor

Hi Alteryx experts,

 

I have a question when using contains function in filter tools to screen out records with specific key words. What i tried to do is to filter out all records that has "TIL" (all capitalized, must be these 3 letters being together and are a standalone word). My current contains function is

 

contains([field],"TIL",1)

 

And the ideal output would be like this(example):

Clinical and biological toxicity of combined treatment TIL, IL2 et Ad-INFg
TIL-Ad-INFg
Super circulating tumor infiltrating lymphocytes(ScTIL)

 

But the output still has a handful of results that are as below(example):

utilized
vitiligo
erectile
Tilt

---which means the casesensitive symbol "1" in contains function does not seem to work.

 

 

Similarly, i also want to filter records than contains "AdV" or "ADV" as independent and standalone words, but not want to include those have "advanced","advantage"... cannot figure out which function can best summarize this?

 

I wonder how should i change my current expression or should i use other functions (e.g., Regex?) Sorry i am still new to Regex and all functions in general so this question might sound dumb.

 

Any suggestion is appreciated!

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @apoptoticbody another approach would be to use the Find and Replace tool. I have mocked up a workflow let me know what you think?

apoptoticbody
7 - Meteor

Hi @JosephSerpis ,

 

thank you very much for your quick reply and suggestion. Yes this worked for me.

 

Actually i have thought about using find and replace but the workflow is very long and has many other key words for search. I was wondering if there's a function or expression that can do it instead of the find and replace flow?

 

Much appreciated for your help!

 

Best,

 

JosephSerpis
17 - Castor
17 - Castor

Hi @apoptoticbody I think you may have to use the Find and Replace tool as it has the option to find whole words only. This might be helpful for AdV" or "ADV as you want to find them as standalone and independent words. In regards to your original post try this syntax contains([field],"TIL","CaseINSensetive=1") . The FindString Function might be another function you want to look at. The alternative would be use Regex.

apoptoticbody
7 - Meteor

Hi @JosephSerpis ,

 

Thank you very much again for your suggestion and reminder!

 

I will try them in the workflow now!

 

Appreciated your help:)

Labels