HOW TO

Split labels from multiple fields to multiple lines in ArcMap

Last Published: April 25, 2020

Summary

Labels from multiple fields on a map document may cross boundaries or appear disorganized when displayed on a single line. For example, as the image below illustrates, the labels from multiple fields crossed the boundaries of the designated area. This can occur when labeling areas have constrained spaces.

Screenshot of labels as a single line.

To make labels from multiple fields more presentable, labels can be split or stacked over multiple lines.

Procedure

There are several possible methods to split a label from multiple fields to multiple lines.

uild a label expression in ArcMap

  1. Open the Label Manager from the Labeling toolbar. For more information on accessing the Labeling toolbar, refer to the following ArcGIS Help: A quick tour of the Labeling toolbar.
  2. In the Label Manager window, select the label class to be split to multiple lines and click Expressions....
Screenshot of the Label Manager with Expressions... highlighted.
  1. In the Label Expression dialog box, enter the following expression based on the parser language used.
Screenshot of the Label Expression dialog box with the expression highlighted.

For Python:
[Field1] + "\r\n" + [Field2]
For VBScript:
[Field1] &vbnewline & [Field2]
For JScript:
[Field1] + "\n" + [Field2]
Note:
For labels with more than two fields, add '+ "\r\n" +' (for Python), '&vbnewline &' (for VBScript), or '+ "\n" + ' (for JScript) to split each field label to individual lines.
  1. Click Verify to ensure that the expression has no errors. Click OK.
Screenshot of Expression Verification with the expression as valid highlighted.
  1. Click OK in the Label Expression dialog box.
  2. Click OK in the Label Manager dialog box to apply the expression on the label class. The labels are now displayed in multiple lines.
Screenshot of the labels after they are split.

Build a label expression in ArcGIS Pro

  1. Click the feature with the label in the Contents pane. Go to the Labeling tab under Feature Layer.
  2. Click Expression Expression icon..
  3. When the Label Class pane appears, enter the following expression based on the parser language used:
Screenshot of the expression entered.

For Python:
[Field1] + "\r\n" + [Field2]
For VBScript:
[Field1] &vbnewline & [Field2]
For JScript:
[Field1] + "\n" + [Field2]
Note:
For labels with more than two fields, just add '+ "\r\n" +' (for Python), '&vbnewline &' (for VBScript), or '+ "\n" + ' (for JScript) to split each field label to individual lines.
  1. Click VerifyThe Verify icon. to ensure that the expression is valid.

    Screenshot of the expression is valid.
     
  2. If the expression is valid. Click Apply. The labels are now displayed in multiple lines.
Screenshot of the labels after the expression is applied.

Stack the labels using the Maplex Label Engine

The Maplex Label Engine allows users to define the parameters to control the position and size of labels in which case it can split a label by stacking it. For stacking labels using the Maplex Label Engine, refer to ArcMap Help: About stacking labels or ArcGIS Pro: Stack labels.

Article ID: 000017012

Software:
  • ArcMap
  • ArcGIS Pro

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