English

How To: Convert a string to proper case in the ArcMap 10 Field Calculator

Summary

The instructions provided describe how to use the ArcMap 10 Field Calculator to convert an uppercase, lower case or mixed case string to a proper case string.

For example, a string is in one of the following formats:

"hello world"
"HELLO WORLD"
"hELLO wORLD"

The Python Function .title() will convert these strings to:
"Hello World"

For information on equivalent steps in a label expression, or on performing this calculation in the ArcMap 9.3.1 or earlier Field Calculator, please see the link in the Related Information section below.

Procedure

ArcGIS Desktop 10 performs all field calculations using the Calculate Field geoprocessing tool. This expression will also work in that tool. For best results, use the Python expression option.

It is recommended that a new field be created, rather than editing and using an existing field.

  1. Add a new field to the feature class in ArcMap.

    1. Open the layer's attribute table by right-clicking the layer in the Table of Contents and selecting Open Attribute Table.
    2. In the Table window, click the Options button and select Add Field...
    3. Assign a name and set the Type drop-down to 'Text'. Make sure the field is big enough to store the values.
    4. Click OK in the Add Field dialog.

  2. Open the ArcMap Field Calculator for the field created in Step 1 by right-clicking the new field name heading in the Table View and clicking Field Calculator. Choose the Python parser option in the upper left.
    [O-Image]
  3. In the Field Calculator dialog box, type the following code in the text box under 'Your Field Name = '
    Code:
    !Existing Field!.title()

  4. Click OK in the Field Calculator dialog box.

Related Information