Brian Dunning's FileMaker Custom Functions

AllTextCombinations ( theText )

recursively subsets a text string into all possible subsets, return delimited, suitable for multikey right side of Portal search relationships

  Average rating: 4.3 (37 votes) Log in to vote

Peter Gort   Peter Gort
Denbigh International Pty Ltd
http://www.denbigh.com.au

Share on Facebook Share on Twitter

  Sample input:
effort
  Sample output:
effort
effor
effo
eff
ef
e
f
ff
f
f
ffo
ff
f
f
fo
f
o
ffor
ffo
ff
f
f
fo
f
o
for
fo
f
o
or
o
r
ffort
ffor
ffo
ff
f
f
fo
f
o
for
fo
f
o
or
o
r
fort
for
fo
f
o
or
o
r
ort
or
o
r
rt
r
t

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

In our solutions we commonly use "Search Portals" where the user enters a search criteria into a global and a multi key relationship displays matching records in a portal. In FM6 the field on the right side of the relationship was a long and complext calculation that had to be individually modified for each table. In FM7 we use a single custom function that calls itself recursively on subsets of the input text. This means that searching of text of _any_ length will work, not restricted to first 60 characters. Note that Filemaker recursion limit means text more than 15 characters long has to be chopped up and processed individually by the function.

 

Comments

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.