Len()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

Len()

Syntax

Len( <FieldName> )

 

Purpose

To determine the length of a field or character expression.

 

Parameters

The name of a field or a character expression.

 

Returns

A Numeric value.

 

Usage

When used together with the "Trim()" function, this function allows you to know the number of characters in a character field. Note that since all character fields are padded with spaces, it is necessary to "Trim" these spaces off using the "Trim()" function inside of the "Len()" function. Using the "Len()" function directly on a field will always yield the same numeric value -- the maximum number of characters the field can hold.

 

Example

You want to know all of the donors who have last names that are more than fifteen characters long. To do this you would create a Custom selection consisting of the following single condition:

 

Len( Trim( .Last_Name. ) ) > 15