Brian Dunning's FileMaker Custom Functions

FieldBeginsWith ( Text )

Creates a multikey field containing all the increments of the beginning of the supplied text.

  Average rating: 4.0 (39 votes) Log in to vote

Andrew Persons   Andrew Persons
Excelisys
http://www.excelisys.com/

Share on Facebook Share on Twitter

  Sample input:
FieldBeginsWith ( "Hello world" )
  Sample output:
H
He
Hel
Hell
Hello
Hello
Hello w
Hello wo
Hello wor
Hello worl
Hello world

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

Creates a multikey field containing all the increments of the beginning of the supplied text. This is useful for such cases as creating a multikey field for type-ahead (clairvoyance) applications.

 

Comments

Bill Doerrfeld   Bill Doerrfeld, Seattle
Sep 4, 2009
AKA ExplodedKey() as created by Andy LeCates

A useful derivative is to restrict the length to prevent adding 1 or 2 character "words" to the key field index.

//ExplodedKey ( text ) =


If (
Length ( Text ) > 3 ; //only explode a string down to 3 characters
ExplodedKey ( Left ( Text ; Length ( Text ) - 1 ) ) & "¶" & Text ;
Text
)
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: