Start Free Trial

Alteryx Designer Desktop Discussions

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

Extracting Fields form filename

Abhii2658
8 - Asteroid

 have 20 files to input in my Alteryx. Their file names follow a pattern 

FileNames

A2A_S10_050

A2A_S43_070

A2A_S70 010

A2A_S20 03

etc

 

When the workflow is run, i need to add 2 fields Field A and Field B based on these names such s 

    File Names                             Field A   Field B

A2A_S10_050                               10           50 

A2A_S43_070                               43           70

A2A_S70 010                                70           10

 

A2A_S20 030                                20           30

A2A_S55                                       55           10 (If only first number is present then Field B is defaulted to 10)

A2A_S40-010                                40           10

A2A_PART1_S40-010                   40           10

A2A6_S85                                      85          10

 

Regards 

Abhijeet 

4 REPLIES 4
BrandonB
Alteryx
Alteryx

This workflow will probably do the trick for you, but there may be more elegant ways to accomplish it. Workflow is attached. 

 

parsing.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @Abhii2658 

 

Here is my take on it.

Workflow:

atcodedog05_0-1631083854094.png

 

Hope this helps : )

Abhii2658
8 - Asteroid

@atcodedog05 

The first record should be 10     50

The second record should be 43     70

atcodedog05
22 - Nova
22 - Nova

Hi @Abhii2658 

 

My bad fixed it

 

Workflow:

atcodedog05_0-1631116888436.png

 

Hope this helps : )

 

Labels
Top Solution Authors