Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Columns rearrangement post Join tool

omkarshinde
8 - Asteroid

image.png
I have my left and right data column anchors of Join tool arranged in the desired order as above. However after join I wish to arrange them one after another without disturbing this order as shown below:
image.png
How can I achieve this? Help appreciated!
Note: This is just a mock data above and my real data contains over 100+ columns

18 REPLIES 18
OTrieger
12 - Quasar

@omkarshinde 
The Join tool enable you to arrange the order of the fields, just move them to the desired order

binuacs
21 - Polaris

@omkarshinde one way of doing this

image.png

omkarshinde
8 - Asteroid

Hey @binuacs  Appreciate your help!
However the macro is messing up the column field names when there are more than one words by replacing spaces with additional _, replacing / with _ and so on because of which union tool is considering all column names as new

omkarshinde
8 - Asteroid

Hey @OTrieger  there are actually 100 fields+ and reordering 200 fields inside join tool is becoming a hassle

binuacs
21 - Polaris

@omkarshinde Can you provide the sample fields name which you are acing issue? i will adjust the regex formula according to that

omkarshinde
8 - Asteroid

@binuacs example whenever there are:-
multiple words in column name separated with spaces then they are replaced as _ instead
spl chars in column names such as () + / - then they are replaced as _ instead

binuacs
21 - Polaris

@omkarshinde @That is the default property of the cross tab tool, it will convert any special character to _, if you have special characters in the field name, then I need to make some adjustments in the macro, one question, is both input files are having same number of fields or it may differ 

omkarshinde
8 - Asteroid

@binuacs both input files have exact same name and fields number

binuacs
21 - Polaris

@omkarshinde updated workflow attached

image.png

Labels