Middle()

 <  Day Day Up  >  

Middle()

Category: Text

Syntax: Middle ( text ; startCharacter ; numberOfCharacters )

Parameters: text ”any expression that resolves to a text string; startCharacter ”any expression that resolves to a numeric value; numberOfCharacters ”any expression that resolves to a numeric value.

Description: Returns a substring from the middle of the specified text field. The substring begins at startCharacter and extracts the numberOfCharacters characters following it. If the end of the string is encountered before the specified number of characters has been extracted, the function returns everything from the start position though the end of the string.

Examples:

 

 Middle ("hello world"; 3 ; 5) 

Returns llo w .

 

 Middle (FirstName ; 2 ; 99999) 

Returns everything except the first character of the first name .

Comments:

The Middle() function is often used in conjunction with other text functions as part of text parsing routines. For instance, if you had a field containing city, state, and ZIP data where the entries were consistently entered as "city, state zip", you could extract the state portion of the string with the following formula:

 

 Let ([commaPosition = Position(CSZ; "," ; 1 ; 1); Middle (CSZ ; commaPosition + 2 ; 2)) 

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net