FileMaker Length and Position Functions


A nice example of using text functions to isolate data from a field by Stuart Gripman of FullCityConsulting:

The past few posts have covered an array of text parsing functions. There are countless scenarios where you may need to manipulate text in FileMaker, but the two I most often encounter are data migration and data grooming. I don’t know how many times I’ve been tasked with taking a free-form telephone number field, laden with inconsistent information and formatting, and cleanly breaking it out into discrete fields for the area code, phone number, and extension. When you have to clean up sloppy data like that, the Left,Right and Middle functions I’ve been writing about just aren’t sufficient for the job. Adding the LengthandPositionfunctions to the mix brings significantly more power.

the Length funcionLength has just one parameter for some text or the name of a field containing text. The result you get is the number of characters that appear in that text. FileMaker counts every character including punctuation, returns, and spaces.

the position function

Massaging data can be challenging. It’s not uncommon to end up with a long and complicated looking calculation that is difficult to read.  My advice:  break the calculation into smaller chunks, with each chunk designed to do a specific thing.  When isolated like that, it’s easier to get a clearer picture of the whole function in your mind.  Gripman offers an easy to follow explanation in his post.

FileMaker Length and Position Functions

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help