Length()

 <  Day Day Up  >  

Length()

Category: Text

Syntax: Length ( text )

Parameters: text ”any expression that resolves to a text string.

Description: Returns the number of characters in the specified text string. Numbers , letters , punctuation, spaces, and carriage returns are all considered as characters.

Examples:

 

 Length ("Hello there!") 

Returns 12 .

 

 Length (LastName) 

Returns 8 when LastName contains "Humphrey" .

 

 Length (Get (CurrentDate)) 

Returns 9 when the date is 3/27/2004.

Note that in previous versions of FileMaker, this last example would have returned 6, because the serialized numeric value for the current date would have been used (as opposed to the "3/27/2004)" formula). To achieve that same result, use the following formula:

 

 Length (GetAsNumber (Get (CurrentDate))) 

Comments:

The Length() function is often used as part of data validation rules. For instance, if you want to make sure that users enter phone numbers with either 7 or 10 digits, you could set up a validation by calculation rule as follows :

Length (Phone) = 7 or Length (Phone) = 10

 <  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