1 Reply Latest reply on May 23, 2011 9:57 AM by philmodjunk

    Value list sorting—I don't want it to!



      Value list sorting—I don't want it to!


      I have a pop-up menu in a layout that displays a VL sourced from a related table containing 20 records. The trouble is, I don't want the VL to sort anything—I just want it to display the values in the table in the order they appear. I created a portal for the user to modify the 20 records and I can happily sort the portal properly by using a sort order field I created in that table. But not the value list. Essentially what I want is to make the sourced VL sort in the same way as if I had chosen Use Custom Values.

      Can't anything be done here?

      Thanks again. 

        • 1. Re: Value list sorting—I don't want it to!

          Since Table::Field based value lists use the field's index (which is always sorted in ascending order), that's not an option that's available to you.

          You might add an auto-entered serial number field to your table of values, put that field in column 2 and sort by it--but now you have this extra number showing in your list of values.

          With this calculation field, you can at least make the numbers invisible, but it works best with small numbers of records and small numbers in the "ValueOrder" field:

          Substitute ( 10^ValueOrder - 1 ; "9" ; " " )

          Put that expression in a caculation field, make it the second column value and specify sorting on the second value. Number your records starting with 1 to keep the values small.