Knowledge Base - Technical Articles
HowTo: Convert a string to proper case in the ArcMap Field Calculator
|Software:||ArcGIS - ArcEditor 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1 ArcGIS - ArcInfo 9.0, 8.3, 9.1, 9.2, 9.3, 9.3.1 ArcGIS - ArcView 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1|
|Platforms:||Windows 2000, XP, 2003Server, Vista, 2008Server, Win 7|
The procedure below is for ArcGIS 9.3.1 or earlier versions. Starting at ArcGIS 10.0, expressions in the Field Calculator are created using only VBScript or a standard Python format.
Instructions provided describe how to use the ArcMap Field Calculator to convert an upper case, lower case or mixed case string to proper case. For example, a string that is in the following formats:
The VBA function "StrConv" converts the string to: "Hello World".
For information on how to do the equivalent steps in a label expression, please see the link in the Related Information section below.
- Add a new text field to the attribute table to store the new string values.
-show me-A. If in editing mode, stop the current editing session.
B. Open the feature's attribute table.
C. Click Options.
D. Click Add Field.
E. Name the field.
F. Type: 'Text'.
G. Set the Length property.
- Open the ArcMap Field Calculator for the field created in the step above by right-clicking the new field name heading in the Table View and click Calculate Values.
- In the Field Calculator dialog box, type the following code in the text box under "Your Field Name = "
StrConv([Existing Field], vbProperCase)
Change [Existing Field] to match the name of the existing field that contains the string values that are not currently in the proper case.
- Click OK in the Field Calculator dialog box.
- Convert a string to proper case in a label expression
Instructions provided describe how to use a label expression to convert a string that is upper case, lower case or mixed case to proper case. For example, if a string that is in the following formats: "hello world" "HELLO WORLD" "hELLO wOR...
- Convert a string to proper case in the ArcMap 10 Field Calculator
Last Modified: 5/19/2011
Article Rating: (8)