Choose a column in the lookup list to sort column by

Home Forums Cascading dropdowns Choose a column in the lookup list to sort column by

Viewing 2 reply threads
  • Author
    Posts
    • #16017
      Travis Goodman
      Participant

        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?

      • #16019
        AdamP
        Participant

          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.

        • #16050
          Alexander Bautz
          Keymaster

            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

            • #16170
              chgrnet
              Participant

                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.

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.