Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Sort field names - Numeric prefix

Krish
8 - Asteroid

I have field names like

01:Name ,04:Type ,10:Status,12:IsReady ,100:IsTested

 

When I use select tool - Sort option It sorts as follows

 

1:Name

4:Type

10:status

100:IsTested

12:IsReady

 

But I need to sort based on numeric value prefix

1,4,10,12,100

 

Thanks in advance.

Krish

 

 

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus
You could text to columns with : as the delimiter and only output 1 field. Select the field and change the type to int16. Now you can sort on that field.

Cheers,
Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
patrick_digan
17 - Castor
17 - Castor

@Krish You could also try a modified version of @AdamR_AYX's field sort macro from his Crew Macros. I've attached the macro. You would want to check the Use dictionary sort box (This was the feature that I added).

Krish
8 - Asteroid

I will try both the options and update.

 

Thanks,

Krish

Krish
8 - Asteroid
Krish
8 - Asteroid

Attached sample flow .

somehow I could not pad 0s in string like 1:Key so I used string manipulation to solve this.

 

PadLeft( SubString([_CurrentField_],0,FindString([_CurrentField_],":")),3,"0")+SubString([_CurrentField_],FindString([_CurrentField_],":"),Length([_CurrentField_]))

 

Also used separate dynamic select for - ve values.

 

Thanks,

Krishna

Labels