Brian Dunning's FileMaker Custom Functions

GetPermutations ( text )

Finds all permutations of a return-delimited list of values.

  Average rating: 4.6 (30 votes) Log in to vote

Jed Verity   Jed Verity
Verity Solutions
mailto:junk@veritys.com

Share on Facebook Share on Twitter

  Sample input:
GetPermutations ( field )
  Sample output:
/* if the field contains
1
2
3
*/

1
2
3

1
3
2

2
1
3

2
3
1

3
1
2

3
2
1

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function takes a return-delimited list of values and finds all possible combinations of the values. The results are delimited with single returns between values and double returns between combinations (see sample output). The returns in the output can then be substituted with whatever delimiters you want.

 

Comments

Martin Turner   Martin Turner, Marlcliff UK
Jan 7, 2016
This is a great function.
However, if you have a 'b' in the text (and, I suspect, a 'z' or a 'u'), it gets confused and inserts '_zub' in the output.

By replacing the term '_zub' in the function with ∂, the function works correctly — provided that '∂' is not then used in the tex.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.