Type
Text Function

Purpose
The lastfirst function converts a text value from the format: First Name [M.] Last Name to the format: Last Name, First Name [M.].
Where [M.] is an optional middle initial.

Syntax
lastfirst( TEXT VALUE)

Returns
A text value.
The contents of the field are rearranged so that the last word (i.e.,the last name) becomes the first word in the returned value. A comma is automatically inserted after the last name.

Usage
The name of this function and the firstlast function refer to the format in which the names are stored in a single field.

Examples
lastfirst( Susan B. Anthony)
Returns: Anthony, Susan B.

lastfirst( T.S. Eliot)
Returns: Eliot, T.S.

lastfirst( FULL NAME)
Returns:The value in the FULL NAME field in the format shown above for every record that is processed. If a record contains the value Roger Birnbaum in the FULL NAME field, the function returns Birnbaum, Roger.