Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
Sort tab-> Expression: =If(Match(Variable, 'X-value'),1,2)
and, check 'Text' - A->Z
Check below link...
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??
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.
that did the trick, thanks