community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

EDI Records - Parse one string of records into individual records

Asteroid

Hello,

 

I am trying to analyze EDI records and cannot figure out how to properly modify the Test To Columns tool to get what I need. See attached workflow for example record.

 

Current State:

All EDI Records are in one single field (it is one day's worth of records)

 

Desired State:

Every time the characters "LIN" appear in the field I want to add a line break, so that ultimately I have one record for each LIN (which should give me ~3000 individual rows).

 

Please help!

--- Kristina

Pulsar

You can use a formula tool to replace "LIN" with something like a pipe delimiter and then use a text to columns tool to split to rows.

Pulsar

replace([string_field],'LIN','|')

Alteryx Certified Partner
Alteryx Certified Partner

Hi @kheuer 

 

I did it in two ways, see attached.

 

REGEX_Formula.PNG

 

- Using Formula Tool + Text to Columns

In your formula, use this expression - REGEX_Replace([EDI], "LIN", "\n")

Then, Text To Columns to split to rows using "\n" delimiter

 

Or you could use the REGEX tool with Tokenize Method.

 

(.*?)(?:LIN|$)

 

See WF attached.

 

Cheers,

Highlighted
Asteroid

Awesome! That worked. Thank you so much.

Labels