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

Alteryx Designer Desktop Discussions

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

Automatically Sort Column headers

skotian1289
8 - Asteroid

Hi All,

I am trying to reconcile two files since the column headers of files will not be the same I have created a mapping file which numbers each column header from the files as "1 File A XYZ" and "1 File B ABC". I am trying to sort the column headers together so that columns which are suppose to reconcile together comes next to each other, but problem with select tool or Join tool is you will have to sort manually if you insert a new file in the tool with new column names each time. Is there a way or a formula tool which can automatically sort column headers based on numbers.

 

Sample File A Column Headers:

1_File A_XYZ       2_File A_EFG

 

Sample File B column headers:

1_File B_ABC      2_File B_BBB

 

Expected:

1_File A_XYZ   1_File B_ABC      2_File A_EFG   2_File B_BBB

 

Thanks

 

 

2 REPLIES 2
AngelosPachis
16 - Nebula

There is a Crew Macro from Adam Riley called Field Sort that does exactly what you are looking for.

 

Annotation 2020-07-14 133042.png

 

I have created a packaged workbook using the macro which you can find attached. 

 

 

grazitti_sapna
17 - Castor

Hi @skotian1289,

 

You can visit this community link and see if this helps with your problem.

 

https://community.alteryx.com/t5/Alteryx-Designer/Need-help-sorting-header-names/td-p/137018#:~:text...

Sapna Gupta
Labels
Top Solution Authors