ExplodedPermutations ( )

Function stats

Average user rating
39
153
9999
Support
FileMaker 7.0 +
Date posted
18 December 2008
Last updated
18 December 2008
Version
Recursive function
Yes

Author Info
 Ender

4 functions

Average Rating None

author_avatar



 

Function overview

Prototype

ExplodedPermutations  ( text )


Parameters

text  Some text to be exploded


Description

Tags:  Multi-key   Filter   Exploded  

Makes keys for filtering portals by substrings. Explodes each word in the text, backward and forward.


Requires an exploded key CF, like this one from LaCates:

http://www.clevelandconsulting.com/support/viewtopic.php?t=49

Examples

Sample input

Sonny Anderson


Sample output

S
So
Son
Sonn
Sonny
Sonny
Sonny A
Sonny An
Sonny And
Sonny Ande
Sonny Ander
Sonny Anders
Sonny Anderso
Sonny Anderson
S
So
Son
Sonn
Sonny
o
on
onn
onny
n
nn
nny
n
ny
y
A
An
And
Ande
Ander
Anders
Anderso
Anderson
n
nd
nde
nder
nders
nderso
nderson
d
de
der
ders
derso
derson
e
er
ers
erso
erson
r
rs
rso
rson
s
so
son
o
on
n


 

Function code

//ExplodedPermutations(text)
//by Mike Hackett

//for making a multi-key with all groupings of consecutive letters

Let(
right = Right(text;Length(text)-1);

ExplodedKey(text) & ¶ &
Case(Length(right) > 1;
ExplodedPermutations(right);
right)
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/153

    Prototype: ExplodedPermutations( text )
    Function Author: Ender (http://www.fmfunctions.com/mid/39)
    Last updated: 18 December 2008
    Version: 1.1

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)