HOW TO
In ArcGIS Online and Portal for ArcGIS Map Viewer, it is possible to concatenate fields in a table and display the field attributes as labels using an Arcade expression. Concatenated labels are useful when displaying summarized attributes on a web map.
This article provides the workflow to concatenate two fields of the same feature layer and display them as labels using an Arcade expression. The two fields are named Street and City.
if (IsEmpty($feature.<field_name1>)) { return Concatenate($feature.<field_name2>, " "); } else { return Concatenate([$feature.<field_name1>, $feature.<field_name2>], " "); }
The image below displays the concatenated labels on the web map.
Article ID: 000030033
Get help from ArcGIS experts
Download the Esri Support App