Alteryx Designer Desktop Discussions

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

Extract and assign doc_nmbr using Multi-Row and Regex_Match

hellyars
13 - Pulsar

Hi, 

 

I am having trouble with setting up a multi-row formula with REGEX_Match.

 

My source data is trapped in a single field.  

Field_1
filename_01-12.pdf
Yada yada yada this is boring
filename_12-92.pdf
Blah Blah Blah is a good song

 

I want the output to look like this.

 

DOC_NMBRField_1
filename_01-12.pdfYada yada yada this is boring
filename_12-92.pdfBlah Blah Blah is a good song

 

My Multi-Row tool is set to create a new field called DOC_NMBR.   My Regex Match is set to ^.*?\.pdf.  The expression works correctly by itself using the Regex tool or when testing on Regex_101, but I can't seem to get it to work in this construct.  What am I missing?

 

IF(Regex_Match([Field_1],"^.*?\.pdf")) THEN [Field_1]
ELSE [Row-1:DOC_NMBR]
ENDIF

 

Thanks!

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@hellyars can you use a contains function instead? contains([Field_1],".pdf"). I would stay away from regex unless necessary. I've attached a quick sample.

 

EDIT: your formula seems to work on my side, I've updated my workflow.

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@hellyars ,

 

Here's my solution for you... Hopefully you like it.

 

capture.png

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels