Choose a column in the lookup list to sort column by
- This topic has 3 replies, 4 voices, and was last updated 9 years, 8 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Cascading dropdowns › Choose a column in the lookup list to sort column by
Hello,
So I have cascading dropdowns setup, and the column I want to lookup to is a single line of text field, but it’s causing sorting to be off.
It’s a mixture of numbers and a description, and in the dropdown will look like this:
103 – WCN_CA_NBO_TUST_WB
1030 – GBNC RES_HN
1034 – GBNC Managers
1035 – MTLA RES_HN INACTIVE
105 – LS Alt Ch ESC Team
I have another column that takes the numbers you see, and holds them as numbers so that I can sort in true numerical order.
103
105
1,030
1,034
1,035
My question is, how can I get the lookup to go to the column with the numbers and description, but sort them in the dropdown by the numerical value column so they stay in proper order?
To keep things as simple as possible could you redo your coding, so that the format is always consistent…103 becomes 0103?
That would sort the ordering.
Unfortunately the sort order is alphabetically on the option display text, and therefore you will not get a proper numeric sorting. If you are able to follow AdamP’s example you will should get it right.
Alexander
I understand how to sort based on this post, but I would like to add it would be very nice if it could sort on an alternate column in the lookup list. I have a use for this where numbers would not be an ideal solution.