Brian Dunning's FileMaker Custom Functions

StackWords ( Text ; StartingIndex ; Stack )

Accepts text consisting of a sequence of words separated by spaces and produces a return-delimited list of the words

  Average rating: 4.4 (29 votes) Log in to vote

John Shanks   John Shanks - Show more from this author
Sunset Knoll Consulting

Share on Facebook Share on Twitter

  Sample input:
StackWords ("The boy rode the blue bicycle"; ""; "")
  Sample output:

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

This function takes advantage of the recursive nature of custom functions move along a set of word (as in a sentence) and stack those words into a return-delimited list. The function stacks one word each recursion until the set is exhausted and returns the result back up through the recusion sequence.

We used this to form a key field pointing relationally to a table of words to determine the existence of words from that table in the sentence of interest.



Wendy   Wendy, Wisconsin
Mar 13, 2015
I couldn't get this to work. I wish custom function posters would include a little more information for newbies.
Alistair   Alistair, U.K.
Oct 10, 2017
Just use the Substitute function!
Nest as appropriate.
For example, the following will substitute spaces and hyphens with returns.

Substitute ( Substitute ( YourField ; " "; "¶"); "-"; "¶")

Log in to post comments.


Note: these functions are not guaranteed or supported by 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 16 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: