How To: Create multiline labels with concatenated text using Arcade in ArcGIS Pro
In ArcGIS Pro, multiline labels with concatenated text (string) can be created using the Arcade label expression. In this article's example, the Schools layer contains information on schools in Florida such as city, ZIP Code, and type of the school, as shown in the attribute table below.
This article describes the steps to create multiline labels displaying the CITY, ZIPCODE, and TYPE field values using the TextFormatting.NewLine constant and concatenate a text preceding each field value.
Note: The TextFormatting.NewLine constant inserts a line break between the labels.
- In an ArcGIS Pro project, add the layer, and create the label expression. For instructions, refer to Steps 1 through 4 in ArcGIS Pro: Writing a label expression, and select Arcade for Language.
- Build the expression in the Expression box.
- In the Expression box, highlight the content, and press Delete to clear the box.
- Type 'City:' + as the preceding text before the CITY field values.
- Under Fields, double-click the CITY field to add to the expression.
- Type + TextFormatting.NewLine to add a line break.
- Type + 'ZIP Code:' +.
- Under Fields, double-click the ZIPCODE field.
- Type + TextFormatting.NewLine to add another line break.
- Type + 'Type:' +.
- Under Fields, double-click the TYPE field.
- Click the Verify button to validate the expression. Click Apply to run the script.
The following is the expression used in this article's example.
'City:' + $feature.CITY + TextFormatting.NewLine + 'ZIP Code:' + $feature.ZIPCODE + TextFormatting.NewLine + 'Type:'+$feature.TYPE
The map below displays the distribution of schools in Florida, labeled with their respective city name, ZIP Code, and school type on separate lines.
- ArcGIS Arcade: TextFormatting.NewLine
- ArcGIS Pro: Text formatting tags
- ArcGIS Pro: Specify text for labels
- How To: Display labels from two or more fields in ArcGIS Pro
- How To: Create multiline labels in ArcGIS Online Map Viewer
- How To: Split labels from multiple fields to multiple lines in ArcMap
Last Published: 9/9/2021
Article ID: 000026373
Software: ArcGIS Pro 2.8.2, 2.8.1, 2.8, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7, 2.6.6, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6