Start Free Trial

Alteryx Designer Desktop Discussions

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

Create an Output File with fields in a specific order

Biren24
6 - Meteoroid

Hi,

 

I would like some assistance on creating an output file with fields in a specific order.

 

My input text file has all the Alphabetical fields shown in the "Desired Outcome" spreadsheet i.e. "A", "B", "C", "Y" and "Z".

 

However the text file always contains dynamic fields. For instance in the 2 fields "Field1_Y" and "Field1", the numerical elements can change every text file, so it could be "Field2_Y" and "Field2" or even "Field100_Y" and "Field100".

 

What I would like to achieve is to have fields "A", "B", "C" always appearing first in the output file. But then the dynamic fields i.e. Field1_Y appearing before Field1 but also appearing before fields "Y" and "Z". 

 

Instead of having to manually select and reorder the fields every input file, I would like to set up a workflow where this is always calculated. 

 

I have attached a desired outcome file. Any assistance on this would be well appreciated! 

 

 

7 REPLIES 7
Ladarthure
14 - Magnetar
14 - Magnetar

Hi @Biren24,

 

could you provide an example of the fields before being sorted the way you expect?

Biren24
6 - Meteoroid

Hi @Ladarthur

 

I have attached an input text file. The alphabetical fields can be in any order, changing from file to file. 

 

Hope this is useful.  

Biren24
6 - Meteoroid

The text file is attached now.

Ladarthure
14 - Magnetar
14 - Magnetar

@Biren24 just to understand it better, you want your fields to be sorted like :

 

A,B...Z

Field1,Field2...

Field1_Y...

 

and how would you like to sort your numeric fields?

Biren24
6 - Meteoroid

I would like the input text file to be sorted in the specific order stated in the output file...

 

i.e. A, B, C 

 

But then Field1_Y and Field1 appearing before fields Y and Z

 

With these dynamic fields I would like the field containing "_Y" appearing before the filed appearing without "_Y" then have fields Y and Z appearing afterwards.

Ladarthure
14 - Magnetar
14 - Magnetar

I made a sample workflow which seems to work, the trick is to use field info and rank your fields using that 🙂

Biren24
6 - Meteoroid

Thank you! I will take a look at this and let you know if I have any queries!

Labels
Top Solution Authors