HOW TO

Cascade numeric labels between two feature layers in ArcGIS Pro

Last Published: November 22, 2023

Summary

In ArcGIS Pro, the numeric labels between two feature layers can be set to cascade using the Calculate Field tool. This is sometimes useful in creating continuity across different feature layers, which can be useful for analyzing sequential or related information.

In this article, two point feature layers are created. The first point feature layer, Point Layer 1, contains 11 point features. The second point feature layer is named Point Layer 2 and contains 7 point features. When the point feature layers' label is enabled, the labels are displayed from 1 to 11, and 1 to 7, respectively. The purpose of the workflow is to align the numeric labels between the two point feature layers and label the points from 1 to 18.

The image below shows the numeric labels between the two point feature layers are not aligned and displayed as 1 to 11 and 1 to 7. 

Image with 2 layers and the labels are not adjusted

Procedure

  1. Add a new field to the attribute table for each feature layer. Refer to ArcGIS Pro: Open the Fields view for steps to add a field to the attribute table.
    1. Specify a name for the new field. In this example, the new field for Point Layer 1 is named PL1, and the new field for Point Layer 2 is named PL2.
    2. For Data Type, select Long from the drop-down menu. Refer to ArcGIS Pro: Numbers for more information.
    3. In the Number Format column, double-click the empty cell in the new field and click the Determine display formatting for numeric and date field types button.
    4. In the Number Format dialog box, click the drop-down arrow for the Category parameter and select Numeric. Click OK.
    5. On the ribbon, on the Fields tab, click Save.
Create new fields
  1. In the attribute table, right-click the header of the recently created field and select Calculate Field.
  2. On the Calculate Field tool window, specify the parameters according to the layer selected.
    1. For the Input Table parameter, select the feature class. In this example, Point Layer 1 is selected.
    2. In the Field Name (Existing or New) parameter, select the field created in Step 1. In this example, PL1 is selected.
    3. In the Expression Type parameter, select Python 3.
    4. In the Expression parameter, specify the following expression:
!OBJECTID! + 0
  1. Click Apply.
Calculate Field tool
  1. On the Calculate Field tool window, change the Input Table and Field Name (Existing or New) parameters to match the second feature class. In this example, Point Layer 2 and PL2 are selected, respectively.
  2. In the Expression parameter, specify the following expression:
!OBJECTID! + <variable>
In this example, Point Layer 2 should display 12 to 18, therefore, 11 replaces the <variable>. The ObjectID increment is according to the addition of 11. For instance, the initial ObjectID is 1 and, when added to 11, becomes 12. Each subsequent ObjectID increases by 1 as it is added to 11.
  1. Click OK.
Second Calculate tool pop up
  1. Display the labels for the field of each layer.
    1. In the Contents pane, right-click the layer, and select Label.
    2. On the ArcGIS Pro ribbon, on the Labeling tab, in the Label Class group, change the Field parameter to the new field created in Step 1.
  2. Save the project.

The image below shows the numeric labels between the two point feature layers are aligned and displayed as 1 to 18.

Outcome of Aligning the Image

Article ID: 000026281

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 3 2

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