SortArray ( valueList ; sortDirection ; dataType )
Sort an array (text, number, date or time ) ascending or descending
Average rating: 3.7 (53 votes) Log in to vote
Mogens Brun - Show more from this author
FM Integrator http://filemakerintegrator.dk |
ipsum
dolor
sit
amet
consectetuer
adipiscing
elit
amet
consectetuer
dolor
elit
ipsum
lorem
sit
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Sort an array of either text, number, date or time values ascending or descending using the sort merge method (originally implemented for custom functions by Shaun Flisakowski and later by Theo Ros). The method is descriped in Wikipedia under "Merge sort".
Performance on a 1,66 GHz Mac Intel Core Duo: 50 word array: 60 msec. 100 word array: 150 msec. 500 word array : 1,1 sec. Sorting of dates are 30% faster.
20-25 times faster sorting of text arrays may be obtained using Troi Text Plug-in.
Comments
Richard DeShong, Logic Tools Jun 7, 2023 |
||
Thank you, Mogens, for this merge-sort version. I was using a recursive bubble-sort, which worked great for short list (almost all of my uses were under 100 values). But I tried that version on a larger list (about 4000), and it would return just a question mark. My guess was that there were too many recursions. But with this merge-sort version, it worked fine, even for about 4000 values. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.