Alteryx Designer Desktop Discussions

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

Check a field if its numeric or alphanumeric and have fixed characters

Saravanan13
8 - Asteroid

Hello All,

 

I have a scenario where I need to check the below conditions:

 

1. Check if a field is numeric or alphanumeric ? -

 

If its alphanumeric then reject.

If its greater than 9 characters then reject.

If its numeric and contain 9 digits then proceed else reject

If the field is null then proceed.

7 REPLIES 7
caltang
17 - Castor
17 - Castor

Your last statement seems to be the only things that matter. You can use a filter tool to do this:

caltang_0-1686143812524.png

 

There is a built in IS NOT or IS Null function. Hope this helps!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Saravanan13
8 - Asteroid

I need to check all the below conditions in one formula

 

1. Check if a field is numeric or alphanumeric ? -

 

2. If its alphanumeric then reject.

3. If its greater than 9 characters then reject.

4.If its numeric and contain 9 digits then proceed else reject

5.If the field is null then proceed.

caltang
17 - Castor
17 - Castor

I've attached a workflow for you to further check.

 

Check Alphanumeric:

IF REGEX_CountMatches([data], '[a-z]')>0 AND REGEX_CountMatches([data], '[0-9]')>0
THEN 1
ELSE 0
ENDIF

 

Check Length:

IF LENGTH([data]) > 9
THEN 1
ELSE 0
ENDIF

 

Check Numeric:

IF IsNumber([data])
THEN 1
ELSE 0
ENDIF

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

You can combine them all into 1 if you'd like. But I've split them up so you can see the logic of each process better. Hope this helps!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
FinnCharlton
13 - Pulsar

Hi @Saravanan13 , this formula will do that for you:

FinnCharlton_0-1686144254914.png

FinnCharlton_1-1686144265369.png

 

 

Saravanan13
8 - Asteroid

Thank you so much

Saravanan13
8 - Asteroid

Thank you

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels