GetWord ( )

Function stats

Average user rating
2.1429
52
114
9999
Support
FileMaker 7.0 +
Date posted
05 December 2008
Version
1
Recursive function
No

Author Info
 uLearnIT

7 functions

Average Rating 2.7

author_avatar



 

Function overview

Prototype

GetWord  ( text;   number )


Parameters

text  any text expression or text field


number  the word to return from the list


Description

Tags:  Text Parsing  

Returns the specified word (by number) from a string.
When using the MiddleWords function to parse one word only, the word count is redundant.

Examples

Sample input

GetWord ( "The quick brown fox"; 3 )


Sample output

brown

 

Function code

/*
GetWord ( text; number )
Purpose: Returns the specified word (by number) from a string.
Author: David Head, uLearnIT
*/

MiddleWords ( text ; number ; 1 )

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

    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/114

    Prototype: GetWord( text; number )
    Function Author: uLearnIT (http://www.fmfunctions.com/mid/52)
    Last updated: 05 December 2008
    Version: 1

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

 

Comments

Fitch
19 December 2008



What is the advantage of using this vs. the MiddleWords function?
  General comment
uLearnIT
19 December 2008



Thank you for asking the question. Although not at all difficult, this function fits neatly with the existing GetValue function provided in FileMaker Pro. When using MiddleWords, I find that 95% of the time I am looking for one word only so the numberofWords argument is always 1. This function simplifies the expression you use when extracting a single word. I feel that this is a very strong feature of custom functions - simplifying expression and meaning.
  General comment

 

 

 

 

 

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)