Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula to find the special characters

Naga
8 - Asteroid

Hello Everyone,

 

I need to formulate a text field to say if it contains special characters then fail else pass. I tried a few other workaround but not worked. Can someone help with this?

 

 "Nw 16@#$%1St Place*&^%" expected output was fail as it contains special characters(only A-z and 0-9 allowed)

 

Thanks

Naga

5 REPLIES 5
mceleavey
17 - Castor
17 - Castor

Hi @Naga ,

 

This is a simple bit of regex matching:

 

\w+

 

Workflow attached.

 

M.



Bulien

Naga
8 - Asteroid

@mceleavey - Thanks for sending this faster. Is there any way I can use the formula tool to say it is Pass / Fail. I have to add additional conditions like not being blank and lenght of char to be this much. So getting that into the formula tool will be more helpful.

mceleavey
17 - Castor
17 - Castor

@Naga ,

 

No problem:

 

mceleavey_0-1623928157257.png

 

Update attached.

 

M.

 



Bulien

Naga
8 - Asteroid

@mceleavey - thanks again. I am looking for something like this. i have added 2 conditions already and need to add a 3rd condition of not having special characters (fail) or can have only A-z or 0-9 (pass). I tried using the regex_match into this but that not work. I have already completed most of the part of it and this what I am trying to break now.  

 

Naga_1-1623928690813.png

 

mceleavey
17 - Castor
17 - Castor

@Naga ,

 

this is what we refer to as Scope Creep 😉

 

Can you mark the previous as a solution to the first part, as this is a completely different problem.

 

You can add the clause I built in as an OR clause.

 

<what you have in your formula> OR [Text_Matched]=0 then "Fail" else "Pass" endif

 

M



Bulien

Labels
Top Solution Authors