Return to FileMaker.com
custom PHP sort find by random
I have a custom PHP site accessing filemaker data. I use
etc to search the database and would like to use something like
$compoundFind->addSortRule('Name', 1, FILEMAKER_SORT_ASCEND);
but sort randomly rather than ascending or decending.
Is this possible? Did I miss that page in the manual?
Filemaker doesn't have a random sort. You can, however, define a calculation field that returns a random number and then you can sort on that field to get a randomized order.
Retrieving data ...