Brian Dunning's FileMaker Custom Functions

GetWord ( text ; number )

Get a specified single word from a string

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

David Head   David Head - Show more from this author
uLearnIT
http://www.ulearnit.com.au/

Share on Facebook Share on Twitter

  Sample input:
GetWord ( "This is a string" ; 2 )
  Sample output:
is

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

While FileMaker provides the LeftWords, MiddleWords and RightWords functions to extract single words and word strings, more often than not I find myself wanting one word only from a string. This custom function makes it easier to extract a single word and makes it easier to read and understand what is being done.

For example, it is easier to read and understand:
GetWord ( address ; 3 )
than:
MiddleWords ( address ; 3 ; 1 )

 

Comments

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:

Under construction. Email me your wish list for improvements.