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.
Procedure
- Start ArcGIS Pro, and open the project.
- In the Contents pane, right-click the feature class, and click Configure Pop-ups to open the Configure Pop-ups pane.
- Click Expressions, and click New.
- In the Expression Builder dialog box, configure the following parameters for the Arcade expression.
- For Name, rename the new expression.
- For Title, specify a title for the new expression.
- 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')
- Click Verify to run a test of the expression. If the expression is valid, click OK.
- In the Configure Pop-ups pane, click Back
and click Edit pop-up element.
- Ensure the newly created expression check box is checked in the Fields Options pane.
The image below shows the leading zeroes are added in the SCHOOLID field when viewed in the pop-up.