SortList ( theList )
Sorts a return delimited list
Average rating: 4.5 (4 votes) Log in to vote
Steve Thoms - Show more from this author
International Plastics http://interplas.com |
3
7
9
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
NOT FOR RUNTIMES - This wraps the list in JSON object notation with the list values as the keys. The values in the JSON are all 1. It returns JSONListKeys result. This function sorts the keys by default. If you want to sort dates, convert them to SQL or other text sortable format. Hope you like it. Thank you to Stam Kapetanakis for mentioning runtime incompatibility. UniqueValues() was added 24 Jul 2020 to avoid a parsing error; thanks to Brian Panhuyzen for noting the shortcoming.
Comments
Oliver Reid Sep 21, 2019 |
||
Elegant and fast | ||
Stam Kapetanakis Feb 15, 2020 |
||
Nice solution; only caveat is that it won't work with Runtime solutions (JSONListKeys not supported on Runtime). | ||
Brian Panhuyzen, Neutrino Data Systems Jul 24, 2020 |
||
This code is elegant, however, when it hits a duplicate in the list it will generate something like: ? * Line 1, Column 389 Duplicate key: 'Alpine White' ...and if the function sorts based on an auto-enter calc, the error destroys your list. |
||
Frederic Bruckert Sep 28, 2024 |
||
Brillant and Elegant !!! Thanks | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.