Brian Dunning's FileMaker Custom Functions

ExplodedString ( Field )

Generates a multi-key field containing all leading characters of each word from a string of text entered into a text field.

  Average rating: 4.2 (34 votes) Log in to vote

David Woodyard   David Woodyard
Woody Digital
http://www.woodydigital.com

Share on Facebook Share on Twitter

  Sample input:
ExplodedString ( StringFieldName )
  Sample output:
StringFieldName = "what the heck"

Returns:
w
wh
wha
what
t
th
the
h
he
hec
heck

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

Based on the MultiFieldExplode custom function introduced to me by Chad Adams. Instead of multiple fields, this function works on a single field with multiple words. You'll need to trap for a single word occurrence as well as any paragraph returns.

Requires the original custom function "ExplodedKey" which was introduced to me by Andrew LeCates.

ExplodedKey ( Text ) =

If (
  Length ( Text ) > 1 ;
  ExplodedKey ( Left ( Text ; Length ( Text ) - 1 ) ) & "¶" & Text ;
  Text
  )

 

Comments

Tim Griffith   Tim Griffith
Feb 26, 2012
What a piece of garbage. It simple does not work!
 
Osmair   Osmair, Palhoça, SC - Brazil
Feb 8, 2013
Thank you, worked perfectly

If (
Length ( Text ) > 1 ;
ExplodedKey ( Left ( Text ; Length ( Text ) - 1 ) ) & "¶" & Text ;
Text
)
 
Lisa H   Lisa H, Santa Cruz CA
Aug 24, 2017
Would love to have this reversed for use in a fast-find situation so user can type in any string of characters that they're looking for like this:

wizard
izard
zard
ard
rd
d


and so on. Then a repeating find operation can whittle down a list of records really fast even if the string is from the middle of a word.

Anyone got something like that?

--Lisa
 

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 15 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: