Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

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

Row contains all digits then True

wonka1234
10 - Fireball

Hi all,

 

Does anyone know how to update a column if a row contains all digits then True?

 

Not sure how to do the all digits part in a formula.

 

Thanks.

5 REPLIES 5
csmith11
11 - Bolide

REGEX_Match([Test Column], "\d*")

 

Please see attached a workflow with this solution implemented.

 

If this helps, please consider marking as the solution so other users can identify solutions faster.

 

Please let me know if you have any questions.

 

Cheers!

OllieClarke
15 - Aurora
15 - Aurora

Hey @wonka1234 I would tweak @csmith11's regex so that it's REGEX_MATCH([Test Column],'\d+'). This will ensure that the column contains only digits, and that there is at least 1 digit in there - if we used '\d*' then nulls and/or empties would come back true

csmith11
11 - Bolide

 @wonka1234  I fully agree with @OllieClarke. This is a great point!

wonka1234
10 - Fireball

hi @csmith11  and @OllieClarke , having trouble implementing it, getting the result as 0. Could this be related to data type?

 

wonka1234_0-1639162160320.png

 

OllieClarke
15 - Aurora
15 - Aurora

Hey @wonka1234 sorry, we interpreted your request as checking that the row is made of only digits. If you want to check that it contains at least 1 digit then use the following formula:

Regex_CountMatches([Field],'\d')>0

OllieClarke_0-1639391003307.png

Hope that helps,

 

Ollie

Labels
Top Solution Authors