Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Better Handling of Carriage Returns / With Dynamic Fields Per Row

brianscott
11 - Bolide

Hello gurus - 

 

I have a situation where I have a table with xml payloads that vary somewhat from record type to record type.  I'd like to take the rows in that table and write out simple, man readable text files that look like of like this:

 

[property0 name] : {property0 value}

[property1 name] : {property1 value}

 

I have tried a few different attack vectors with nothing to show for it.  I can aggregate all columns into a big fat string with a delimeter, but cannot get a carriage return ('\n' or '\r') to effectively render on the back end with a straight output to .csv.   If I wanted to add columns manually with the report text tool, I am in a place where I can go text to columns, but in this case, I have problems with a varying number of columns per row, and the report text wants to place columns explicitly.  Also, if I set the number of columns to split to a large enough value to hold the most complicated payload, I wind up with a bunch of empty columns for rows with relatively simple payloads.  If I *really* felt like it, I could probably craft something to detect my number-of-columns criteria column and write a dedicated stream of text to columns to match expected values, and a dedicated report text per criteria type to spit out.  It is technically feasible for my use case, with 'only' about 15 different variations needed, but it seems like cheating and clearly won't do anyone any good if you had 399 different variants.  

 

Sample workflow attached where I've pushed both sets of data per row into a delimited field.  

 

You are my only hope! 

 

brian

4 REPLIES 4
brianscott
11 - Bolide

Actually, it looks like I can apply as many [A#] values to a report and it will ignore any empty fields.  So maybe this isn't so difficult.  But I'd love to see someone else's ideas. 

 

brian

GarthM
Alteryx Alumni (Retired)

how about this?

brianscott
11 - Bolide

GarthM - 

 

Outstanding!  I love it.  Thank you! 

 

brian 

GarthM
Alteryx Alumni (Retired)

i guess i got lucky :\

Labels