Brian Dunning's FileMaker Custom Functions

AllTextCombinations ( theText ; stackDepth )

recursively subsets a text string into [almost] all possible subsets, return delimited, debatably suitable for multi-line key foreign side of Portal search relationships

  Average rating: 3.8 (38 votes) Log in to vote

Jeremy Bante   Jeremy Bante
OshVay Systems, Inc.
http://www.oshvay.com

Share on Facebook Share on Twitter

  Sample input:
AllTextCombinations( "abcd"; 0)
  Sample output:
abcd
abc
ab
a
b
bc
b
c
bcd
bc
b
c
cd
c
d

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

This is a revised version of Peter Gort's AllTextCombinations(theText) function designed to better handle FileMaker's limited function-call stack. It _will_not_ work perfectly for text of any length, but it should work pretty well for shorter strings. Unfortunately, it is very slow and inefficient at what it does in comparison to the oAzium Portal Filter plug-in: the size of the result roughly doubles for each of the first 15 characters! Furthermore, this function will only evaluate "properly" for the first 105 characters of theText.

 

Comments

Kevin Smith   Kevin Smith, Cloud
May 3, 2010
Hi

A script that called this function works fine using FM 10 Advanced. When running in FM Advanced 11.0v1 it causes FileMaker to crash.

I have not troubleshooted the circumstances under which this occurs.

Regards
Kevin Smith
 
Chris Page   Chris Page, San Jose, CA
Feb 12, 2014
Try this one:

http://www.briandunning.com/cf/784
 

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.