HOW TO

Convert a string to proper case in ArcGIS Pro

Last Published: July 15, 2022

Summary

In ArcGIS Pro, some features in the attribute table are written in uppercase, lowercase, or mixed case. Sometimes, it is necessary to standardize the casing of the features to ensure data consistency.

In this article, strings are converted to proper case strings using the Python and Arcade expressions in ArcGIS Pro.

The field with uppercase, lower case, and mixed case strings in the attribute table.

Procedure

  1. Open the ArcGIS Pro project.
  2. Add a new field to the feature class in ArcGIS Pro.
    1. In the Contents pane, right-click the layer and click Attribute Table.
    2. In the attribute table, click Add Field The Add Field icon..
    3. In the Fields view, specify a name for the field in the Field Name column.
    4. Double-click the Alias column and specify an alias for it.
    5. Double-click the Data Type column and select Text from the drop-down.
The Fields view with a new field to be configured.
  1. On the top ribbon, on the Fields tab, click Save.
The Save option in the Changes group.
  1. In the table view, right-click the field's header and select Calculate Field.
Opening Calculate Field on the new field.
  1. In the Calculate Field window, select the field from the Field Name (Existing or New) drop-down. In this example, City Proper Case is selected.
The drop-down options in the Calculate Field window.
  1. Select Python 3 or Arcade from the Expression Type drop-down.
  • For Python 3, in the <Field_Name> box, type the following expression and click Verify.
!fieldname!.title()
The Python expression configured in the box.
  • For Arcade, in the <Field_Name> box, type the following expression and click Verify.
Proper($feature.fieldname)
The Arcade expression configured in the box.
  1. When the message, "Expression is valid" is returned, click OK.
The Calculate Field window with the “Expression is valid” message.

The following image shows the string converted to proper case.

The strings in the City Proper Case field converted to proper case.

Article ID: 000027944

Software:
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options