We can currently only natively sort a table based value list by encoding.
We need to be able to select sort by field (xxx:xxx) and be able to choose asc or desc
What should be a simple solution, IF FMI would implement it: In the value list by field definition, allow a second field to be selected BUT NOT SHOWN, and use that to sort. It could be a sequence field, so that it would resolve the sort order issue.
I've recently discovered an issue with the technique to sort a value list by using zero width non-breaking spaces in front of the values, also known as byte order marks (BOMs) that breaks when a file is hosted on FileMaker Server 14 and 15 (possibly also 13) where the first character is stripped after the value has been selected from the value list. See these articles for more information on the technique:
Extending FileMaker Pro’s value list sort capabilities using the Char() function - Soliant Consulting
I've created a demo file that describes the issue here:
First character of field is removed when file is hosted
While this technique did work well, I feel it shows the need to have this functionality native in the product line. Having the sort order work as krheinlander describes above, or to to sort in creation order may be an option. At least krheinlander's suggestion would allow users to control the sort order.
rather than using the characters, I'd prefer a way to sort a value list by a field that is not even in the dialog (currently):
customerID, customerName, sortOrder
2, ABC, 1
5, DEF, 2
That way the ID is what is 'set' in the field when selecting the valuelist item, the Name is what is shown and the sortOrder is how they are displayed in the selection list.
I have clients with custom lists (weights and measures, for example) and rather than 'custom list' (which is difficult to populate without developer access). It would be nice to give them a table with the 3 different fields and use as above. The measures could be in the order needed, for example:
(the above does not sort alpha, so something else needs to be in the valuelist dialog!)
the user wants to select the measure, not a sortOrder value and not an "ID" value. but wants to sort by the sortOrder.
just my musings,
I'd like to see a new "Sort Value List" checkbox, with a "Specify" button next to it where you can specify the sort order. This could be similar to the way a portal or relationship is sorted. If it was implemented this way, the current "Re-sort values based on:" option could be moved into the standard sort dialog, where it's called "Override field's language for sort".
Maybe if the sort option is not used, then the list is "unsorted" in which case it acts like a table of unsorted records where the records created first are listed first, and those created last are listed last.
Value List Sort By Field seems to have the most votes. Other votes for:
Sort valuelist created from a table by a custom field
Sorted value lists
should be merged after those other posts are marked as duplicate
Agree to Sort but hide the Sort field and just display the Value List Items.
I'ld like to see same feature for portals as well:
Sort Portal Records by Field Name ; up/down
Hi, Choose field to sort list or drop-down menu
Retrieving data ...