property nameThe which is used to change the case of text.
Answers
Answer:
When using text in an attribute table for labeling features (or generating
reports), you may discover that all or some of the data in the desired
field was entered in UPPERCASE, lowercase, or mIXEed cASe rather
than Proper Case. Using the field as it is will produce unattractive
results, but manually entering this data correctly is probably not a viable
option.
Here are two strategies for displaying text in proper case (i.e.,
the first letter of each word in uppercase and remaining letters in
lowercase). Each technique can be quickly applied. One will create a
new field and populate it with text converted to proper case. The other
uses a label expression to cause labels to display in proper case. Both
make use of VBScript.
The Permanent Fix
A simple line of VBScript and the Field Calculator in ArcMap can copy
the contents of the offending field into a new field and convert the text
to proper case. This example will use a layer containing the names of
Florida cities created entirely in uppercase.
1. Right-click on the Cities layer in the table of contents (TOC) and
choose Open Attribute Table.
Two Quick Ways
to Change a Labeling Field to Proper Case
Use the Field Calculator or a Label Expression
By Monica Pratt, ArcUser Editor
There are two solutions when the text field in an attribute that you
want to use for labeling is not in proper case.
Create a
new field in
the attribute
table that will
contain the
reformatted
text field.
Use StrConv in the
Field Calculator to
populate the new
field.
2. Add a new field to hold the converted data by clicking the Options
drop-down at the lower left of the table and choosing Add Field.
3. In the Add Field dialog box, name the field something other than the
original field’s name, choose Text as the type, and set the length to
accommodate the longest name in the field. In this case, the original
labeling field was called NAME and the new field was called
ProperName.
4. Right-click on the header for the new field and choose Field
Calculator.
5. In the text box under ProperNames = enter the following VB code,
StrConv([Existing Field], vbProperCase)
substitute the name of the field to be converted to proper case for
[Existing Field], and click OK. In this example, the expression
would be
StrConv([NAME], vbProperCase)
The new field will be populated with the same text but that text will
be in proper case. This new field can be used for labeling map features
or generating a report