Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have three values in a list box that I wish to show at the top of the list box then show all other values below in alphabetical order. The three values are:
No Specialty (ALL)
No Specialty (Doctor)
No Specialty (Nurse)
Can anyone help?
Thanks in advance
I have a probably not-so-perfect solution :
create a column where these 3 values have a 1 and others 0 then use this column to sort by the average of the expression. this could be done with a mapping.
Hope this helps
this auxiliary field on script definetly works!
If you want to create something outside scritp, you could use match function:
Sort by expression, descending and use:
= match( YOUR_FIELD, 'No Specialty (Nurse)', 'No Specialty (Doctor)', 'No Specialty (ALL)')
This function will return:
No Specialty (ALL) = 3
No Specialty (Doctor) = 2
No Specialty (Nurse) =1
the others = 0
Rgds,
Erich
Thanks Erich,
When I select another valuen in the list box, it moves these back into alphabetical order. Is there an expression that can sort by whether a value is selected (state) and then keep these three values at the next values in the unselected list below what is selected?
Many thanks,
Chris
Ok, you want to keep this order all the time.
Change it to:
= match( only ({1} YOUR_FIELD) , 'No Specialty (Nurse)', 'No Specialty (Doctor)', 'No Specialty (ALL)')
The expression must be the only 'Sort by' condition;
Hope it helps,
Erich