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

How to know if the fourth character is a number

BraulioCarsolio
5 - Atom

Hi, community!

 

I'd really appreciate your help. I have a field named "Case Code", where I can get different inputs, such as:

R9WCCase

M8KR,

6TQ10/1/23-10/13/23

etc...

 

My question is, how can I set an if statement that keeps the first three characters if the fourth is a number, and to keep the first four in any other situation?

The solution should look like this, based on my previous example:

R9WC

M8KR

6TQ

 

Thank you so much in advance!

2 REPLIES 2
binuacs
21 - Polaris

@BraulioCarsolio One way of doing this

image.png

BraulioCarsolio
5 - Atom

Works perfectly. Thank you so much!

Labels
Top Solution Authors