GIS title image
Menu
- GIS Home
- GIS Data
- User Group
- News & Info
- Training
- Resources
- Mapping Applications


How To Create Complex Labels

A number of users have had trouble creating aesthetically pleasing maps when trying to label features with long character strings. For example, the 12-digit parcel number if often bigger than the actual parcel and the map looks like a jumble of numbers.

ArcGIS has some advanced features that may help solve this problem. Label expressions allow the user to manipulate the label that is displayed using VBScript or JScript. To access this capability, double-click on the layer name in the table of contents to display the Properties dialog window. Then click on the Labels tab. In the middle of the window you will see the Expression button. Click on the button to open the Expression builder.

Some example expressions are shown below to help you learn how to use this functionality. These are fairly simple examples; the full power of this functionality is limited by the user's programming skill.

Just copy the expressions from the web page and paste them into the Expression area. Be sure to clear out any text that is already there.

Display just the 3-digit parcel number, but not the book, page and block number

Mid([ASMT], 7, 3)

This turns "123456789000" into "789".


Display more than one field in a single string

REPLACE(TRIM([StreetNum]) & " " & [StreetDir] & " " & [Street] & " " & [StreetType], " ", " ")

This turns "123", "Main" and "St" into "123 Main St".


Display just the book & page number for a parcel.

LEFT([ASMT],3) & "-" & MID([ASMT],4,2)

This turns "123456789000" into "123-45".


Display one field on top of another field.

[OWNER] & vbCrlf & [ASMT]

This creates a label with two rows of text.


Here are some basic VBScript commands to help you start building your own expressions:

LEFT("John Smith",4) returns "John"

RIGHT("John Smith", 5) returns "Smith"

MID("John Paul Smith", 6, 4) returns "Paul"

REPLACE("My Chair", "My", "Your") returns "Your Chair"

LCASE("GoodBye") returns "goodbye"

UCASE("GoodBye") returns "GOODBYE"

TRIM(" John Smith ") returns "John Smith"

& - used to link functions and statements together

vbCrlf - used to force a carriage return


Official Site of the County of Napa, California
©1996, 2003, County of Napa