The FileMaker Functions Of Left, LeftValues And LeftWords

From Dwayne Wright PMP
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit or other formatting of the posting may fail. For the best experience, please visit the journal directly by clicking (here).

The left family of functions are used to break text strings up, starting from the left of a specified position. This is a common technique called parsing, a process of breaking up a text string into smaller pieces. So parsing is basically getting what you want out of a text string and ignoring the rest.. Although it may seem intimidating at first, it quickly becomes a welcome tool in FileMaker development when mastered.

 

Left
Left(text; numberOfCharacters)
FMP Version: FMP 7 and FMP 6
This function can return a specified number of characters from the left of a field, word or expression.

EXAMPLE: Left ("LeSaux Media Services", 9)
This example would return a text result of LeSaux Me. This is because I asked for the left 9 characters of the string LeSaux Media Services.

-------------------------------------

LeftValues
LeftValues( text ; numberOfValues)
FMP Version: FileMaker 7
This function will pull a number of data strings from a number of carriage returns. Used frequently to parse out each line of an array.

EXAMPLE:
LeftValues(values_list; values_variable)
This example allows you to use a field ( values_variable ) to choose how many values to the left from the beginning of the string will be returned.

-------------------------------------

LeftWords
LeftWords( text ; numberOfWords)
FMP Version: FMP 7 and FMP 6
This function can return a specified number of words from the left of a field or string of text. For example... LeftWords(LeSaux Media Service, 2) would return a text result of LeSaux Media. This is because I asked for the left 2 words of the string LeSaux Media Services.

EXAMPLE: LeftWords ("LeSaux Media Services", 2)
This example would return a text result of LeSaux Media. This is because I asked for the left 2 words of the string LeSaux Media Services.

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.