1 Reply Latest reply on Feb 22, 2015 6:28 PM by philmodjunk

    Value List numerical sort



      Value List numerical sort


      I'm trying to sort a value list in ascending numerical order.  I want to sort by the second field which is usually just a number but occasionally has alpha characters.

      I don't seem to be able to get the list to sort numerically even if all values are numeric.  I know I have seen the answer to this in the forum but can't find it again.  I'm pretty sure it has to do with the field type but I've tried both text and number and neither works.

      Sorry to  be asking questions that have already been answered in the forums.

        • 1. Re: Value List numerical sort

          If you have a "use values from field" value list with both first and second field set up to refer to a field, you have only two options: a) you can sort the values in ascending order by the first field or b) sort the values in ascending order by the second field. That's it.

          So you should be able to specify the second field as your sorted field, but it's not clear where this breaks down for you given that you have both numbers and text in the same field. If this is a text field, you'd need to reformat the numeric values with leading zeroes in order for the text values to sort correctly into numeric order.

          But if you were to put a selection portal inside either a popover ( fileMaker 13) or a new window (Older versions), you could use the same table of values to list your values for selection and now you have many more options for sorting data and the ability to use/display data from more than two fields.

          For examples of selection portals, some in popovers, some not, see:

          "Adventures in FileMaking #2 - Enhanced Value Selection".