ClarisWorks: Extracting Names From a Field

How to extract the first, middle and last names from a full name field when these items are separated by spaces.

This information was provided by Claris Corporation on 16 March 1998, and incorporated into Apple Computer's Tech Info Library.
Given that FULLNAME is a text field in a ClarisWorks database and that data is consistently entered with first, middle and last names all separated by a space, here are calculations to extract the first, middle and last names:

FIRST (CALCULATION, TEXT RESULT)=
LEFT('FULLNAME',FIND (" ",'FULLNAME',1)-1)

MIDDLELAST (CALCULATION, TEXT RESULT)=
RIGHT('FULLNAME',LEN('FULLNAME')- FIND(" ",'FULLNAME', 1))

MIDDLE (CALCULATION, TEXT RESULT)=
LEFT('MIDDLELAST',FIND(" ",'MIDDLELAST',1)-1)

LAST (CALCULATION, TEXT RESULT)=
RIGHT('MIDDLELAST',LEN('MIDDLELAST')-FIND(" ", 'MIDDLELAST', 1))

Notes for calculations:
1. Each of the fields is a calculation field with the result formatted as text.
2. Double quotes in the calculations have a space between them.
3. The MIDDLELAST is an interim field that need not show on your layout.
4. When a new record is added and there is no entry in the FULLNAME field, any calculation fields showing on the layout will show #ERROR! until data is entered into FULLNAME.split
Published Date: Feb 18, 2012