HOW TO

Add leading zeroes to numeric pop-up field values in ArcGIS Pro

Last Published: August 24, 2023

Summary

When adding a stand-alone table or dataset with leading zeroes in the field to ArcGIS Pro, the zeroes are omitted from the attribute table or pop-up. This article provides the workflow to insert leading zeroes in pop-up field values using an Arcade expression in ArcGIS Pro.

The image below shows the SCHOOL_ID field without any leading zeroes in ArcGIS Pro. In this example, the leading zeroes are added to the SCHOOL_ID field.

The attribute table and pop-up of the layer without leading zeroes in ArcGIS Pro

Procedure

  1. Start ArcGIS Pro, and open the project.
  2. In the Contents pane, right-click the feature class, and click Configure Pop-ups to open the Configure Pop-ups pane.
Opening the Configure Pop-ups tool of the feature class from the Contents pane
  1. Click Expressions, and click New.
  2. In the Expression Builder dialog box, configure the following parameters for the Arcade expression.
    1. For Name, rename the new expression.
    2. For Title, specify a title for the new expression.
The Expression Builder dialog box with the parameters to be filled
  1. In the Expression section, insert the following Arcade expression. Insert the number of zeroes according to the number of digits. In this example, the expression is used to add leading zeroes for four digits.
Text($feature.<fieldName>, '0000')
  1. Click Verify to run a test of the expression. If the expression is valid, click OK.
The Expression Builder dialog box with an example of the Arcade expression
  1. In the Configure Pop-ups pane, click Back The Back icon and click Edit pop-up element.
The location of the Edit pop-element icon in the Configure Pop-ups pane
  1. Ensure the newly created expression check box is checked in the Fields Options pane.
The Fields Options pane

The image below shows the leading zeroes are added in the SCHOOLID field when viewed in the pop-up.

The configured pop-up window displaying the leading zeroes added in the SCHOOLID field

Article ID: 000031023

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

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