Free Trial

Alteryx Designer Desktop Discussions

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

Drop Down Box - forcing sort order to be descending

fmilliren
8 - Asteroid

In an analytic app I am trying to make a dynamic drop-down box that feeds into a Filter tool be in descending order instead of the default ascending order. It looks like the cross tab tool is where the issue starts as I am sorting in descending order in the previous tool.

 

I have looked at numerous posts, searching for "Alteryx descending order within drop down list" and various forms of that. Post https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-customize-sort-order-us... seemed close but isn't what I need.  Also, while post https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-customize-sort-order-us... initially looked promising the @order - value attribute shown in the action tool with a manually created list is not present when using a dynamic list.

 

I'm including a screenshot of a mockup flow with dummy data to show what I've created thus far. The drop down clearly works, I just need it to be in descending order so the most recent value is listed first. I'm thinking I would either have to re-order the columns after the cross tab tool or use another interface tool to add sort functionality to the Action tool but I just can't see the path for either.

Action tool config:

Action_tool_config.png

 


Current workflow drop-down box only displays in ascending order. 

drop_down_box_testing.png

5 REPLIES 5
apathetichell
19 - Altair

pre crosstab -> sort on your values column. use recordid. crosstab on recordid as name/value as value. use dynamic rename to take your column names -> feed into tool.

OTrieger
13 - Pulsar

@fmilliren 

Have you tried to add Sort Tool just after the Cross Tab tool, just before you connecting to the Drop down tool?

fmilliren
8 - Asteroid

@apathetichell 
OH! That makes sense. I had tried using that record id tool but hadn't connected the dots to dynamically rename the columns using the first row of data. The row of data is technically lost but since it's feeding into the drop down tool that doesn't matter. Awesome solution thank you!

new configuration:

drop_down_box_retesting.png

 


sort order working as desired:
drop_down_box_retesting2.png

fmilliren
8 - Asteroid

@OTrieger 
Unfortunately with only one field of data the cross tab tool puts everything on one row so there is no data to sort. Also it won't sort the column headers, which is what the drop down tool picks up for display.

apathetichell
19 - Altair

@fmilliren- thanks!  the recordid/rename way is also useful because of how crosstab handles special characters in column names (ie it regex replaces them with an underscore) - if your dates were labeled as say 2025-04-10 - you'd see it as 2025_04_10 if you used your original solution. the dynamic replace avoids this issue.

Labels
Top Solution Authors