
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sort with value X on top and the rest alphabetical
Hello,
I am looking to achieve this sort order in a list box:
Variable |
---|
X-value |
A |
B |
C |
D |
E |
F |
Problem is that the values A, B, C etc. are extracted from an excel file the user can adjust. So the number of values and the naming of the values is variable. The X-value is added manually in the script but has to show on top of the listbox.
The following script in accordance with 'sort by load order' in the List box leads to the X-value being on top but the others not being sorted alphabetical.
Load * inline
[Variable
X-value];
join load distinct
Variable
from excel
Is it possible to achieve this? your help would be much appreciated.
Regards,
Peter
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a feature. In that case, you have to bypass the selection. Try like:
Sort tab-> Expression: =If(Only({1}Variable)= 'X-value',1,2) , with State and Text options are checked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sort tab-> Expression: =If(Match(Variable, 'X-value'),1,2)
and, check 'Text' - A->Z

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check below link...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
I used this but it still didn't work in the listbox.
But then I discovered that this is because the option 'Always One Selected Value' was checked. And I need this option... so is this a logic feature or is this a bug??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a feature. In that case, you have to bypass the selection. Try like:
Sort tab-> Expression: =If(Only({1}Variable)= 'X-value',1,2) , with State and Text options are checked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that did the trick, thanks
