We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Empty Columns with specified characters

Carlyn
8 - Asteroid

Hi - I am trying to create a txt file which includes combined data strings.

 

These are now all working and the only remaining issue I have is that there are 5 empty columns in the format that I need to create, and each of these columns have a specified number of characters.

 

Column 1 - 1 Character

Column 2 - 2 Characters

Column 3 - 4 Characters

Column 4 - 11 Characters

Column 5 - 2 Characters

 

do you know how I can format some empty columns in my text file. I have tried using a formula tool at the end of my flow  and then a select tool where I tried to re-name the columns with the relevant amount of spaces (characters) required, but this has not worked, as it returns the columns with ,, and all for 2 spaces .

 

I also tried using the Padleft formula to see if that would work with spaces, but I still get the same output where the empty columns on the txt file are showing as ,,

 

AR3SU10202010300,,RCB,,202412202024122000000000000279287.68D0000000000,,461864RC-461864,,ARS0000000000000279287.68DARSRC,,000000000

 

I have attached my workflow to demonstrate what I mean.

 

Any suggestions would be appreciated

4 REPLIES 4
binuacs
21 - Polaris

@Carlyn you need to add a space in the padright() function

image.png

image.png

Carlyn
8 - Asteroid

Hi, I need the layout you are showing but without the commas.

davidskaife
14 - Magnetar

Hi @Carlyn 

 

You mean a text output like this?

 

Capture.PNG

 

I've added a few extra steps to your workflow, let me know if it works for you

 

Capture2.PNG

A RecordID tool, a Transpose tool to pivot the data vertically using the Record ID as a key column, a Summerize tool to group by Record ID and concatenate the values (on the concatenate option, remove the comma as a separator), then finally remove the Record ID

Carlyn
8 - Asteroid

Thank you - this is ideal!

Labels
Top Solution Authors