ShuffleValues ( List )
Rate this function: Average rating: 3.3 (16 votes) Discuss this Custom Function
Ray Cologon, NightWing Enterprises
http://www.nightwing.com.au/FileMaker
Re-orders a list of values, returning them in a random sequence.
Sample Input:
|
Sample Output:
|
Description:
This is a relatively straightforward recursive function designed to receive a list (values separated by carriage returns) and return it in a random order.
The function includes a closing condition which serves the purpose of ensuring that the returned list does not have an added trailing CR. For consistency with FileMaker 7s other Xvalues functions (all of which add a trailing CR if one isn't already present), this could be left off if desired.
Note that as the returned order is random it is *possible* that the list may be returned in the same order - though the probability of this reduces radically as the number of items on the list increases (eg with a list of only two items the probability that they will be returned with their order unchanged is 0.5, with three items the probability reduces to 0.17 and with four it is approx 0.04)
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:There are no comments yet. Be the first to post a comment about this Custom Function! Please try to keep it brief & to the point. Anyone can post:
|
Newest Custom Functions:
| 1. |
list.intersect (listA; listB) |
| |
(Mon, May 14, 12:43pm) |
| 2. |
WeekStart ( weekOfYear ; year ) |
| |
(Sat, May 12, 8:42am) |
| 3. |
PercentToWords (FIELD) |
| |
(Thu, May 10, 3:16pm) |
| 4. |
PercentToText (FIELD) |
| |
(Thu, May 10, 2:37pm) |
| 5. |
StripReserved( text ) |
| |
(Wed, May 02, 6:05pm) |
| 6. |
ListBaseTables |
| |
(Wed, May 02, 3:48pm) |
| 7. |
ValidEmail( theEmail ) |
| |
(Wed, May 02, 7:27am) |
| 8. |
UltraDate (Text; LongDate_or_DateDigit) |
| |
(Wed, May 02, 6:07am) |
 |
|