Alteryx Designer Desktop Discussions

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

Marco column order

max_hfr
8 - Asteroid

Hi guys,

 

 

 

I have a macro that one of the community users helped me build. The goal was to divide a large file into multiple smaller files.

 

My problem is that the columns have to be arranged in a certain order in the output and i can't change it. I have tried using select tools on multiple parts of the workflow but nothing changed.

 

I have attached the workbook i'm struggling with  aswell as the original macro.

 

the input file contains (Classeur 6.xlsx):  ID ; First Name; Last Name ; Code

 

The output shows:  Code ; First Name ; Last Name

 

I need the output to look like:   First Name; Last Name ; Code

 

 

Do you have an idea on how i can change the column order in the output.

 

Thanks in advance,

 

 

Max 

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Insert in the macro a select as the last step and rearrange the column as wanted selecting the field to be arranged using the up down arrows on the configuration.

 

Update: I have looked at your workflow, the transpose tool orders the columns by name (From A to Z. Code -> First Name -> Last name). You have to put the select tool after it.

Claje
14 - Magnetar

Hi,


Maybe I'm misunderstanding what the macro is trying to accomplish, but I'm not sure there is a reason why you need one to get the output you are looking for.  I think you can just bring the Output Data tool from the macro in after your Select tool in the initial workflow.

 

I ran your macro and my workflow and they produced the same number of results and the same data, just with different field orders.

 

Can you try running the attached workflow with your data and let me know what results aren't consistent?

max_hfr
8 - Asteroid

Hi,

 

thanks for explaining me the logic behind it. Unfortunately, I had already tried to insert a select there but it didn't work.

However I have just changed the excel column names with A B C and that worked. 

It a "half fix". 

 

Thanks a lot anyway!

Labels