Alteryx Designer Desktop Discussions

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

Need Help with Regex Match Filter on 2 fields

pvara
8 - Asteroid

My Sample Data Set as Follows

Invoice Number Credit Memo Number
340BVIR0000004571 12345
NOMemoNomemo
6765767612346

 

Regex_Match ([Invoice Number], "^\d\d\d\d.*")

AND

REGEX_Match([Credit Memo Number], "^\d\d\d\d.*")

 

I would like to see the TRUE to look something like this.

 

Invoice Number Credit Memo Number
  12345
6765767612346
20 REPLIES 20
grossal
15 - Aurora
15 - Aurora

You could do something like this:

 

grossal_0-1588627229438.png

This allows you to treat the bad data differently than the good data. Workflow sample attached.

 

 

Best

Alex

pvara
8 - Asteroid

Hi Alex,

I like your approach however, I was expecting to 2 records for the FALSE for Invoice Number.

Any thoughts?

 

pvara_0-1588628822294.png

 

grossal
15 - Aurora
15 - Aurora

I think your original Input showed this: 

grossal_0-1588632737318.png

 

Therefore I changed the Filter condition from your original AND (that didn't not match your provided data sample) to an OR. If we switch the condition we get two bad and one good:

 

grossal_1-1588632806679.png

 

Updated workflow attached. Is this what you want?

 

Best

Alex

pvara
8 - Asteroid

Hi @AbhilashR 

When reviewing your REGEX_Match Expression

 

Regex_match([Invoice Number], ".*\d{4,}.*")
AND
REGEX_Match([Credit Memo Number], "[0-9].*")

 

It did not catch this value for Invoice Number

340BVIR0000004571

 

If we can catch this value then we will be solid.

 

Thank you

pvara
8 - Asteroid

Hi @grossal 

i believe you attached the incorrect workflow.

AbhilashR
15 - Aurora
15 - Aurora

Hi @pvara, the output of my workflow matches the original output you were looking to create. What should the output of the workflow be?

AbhilashR_0-1588633376547.png

 

grossal
15 - Aurora
15 - Aurora

I fixed the attachment @pvara. Take another look 😃

pvara
8 - Asteroid

Hi @AbhilashR 

What is in the red box should show up in the false in the filter

The non red boxed should be in the true.

 

pvara_0-1588633600549.png

 

pvara
8 - Asteroid

Hi @grossal 

can you please reattach the file? 

grossal
15 - Aurora
15 - Aurora

Here it is 😃

Labels