HOW TO

Automatically return XY coordinates as null values after moving point features in ArcGIS Pro

Last Published: February 26, 2025

Summary

In ArcGIS Pro, it is possible to automatically return null values for XY coordinates in an attribute table after moving point features to a different location on the map. This functionality can be implemented using attribute rules that trigger when the feature geometries are changed. Automating this process ensures the outdated XY coordinates are deleted, providing flexibility to identify and update only the modified features by recalculating the XY coordinates using the Calculate Geometry Attributes tool.

This article provides the workflow to automatically return XY coordinates as null values in the attribute table after point features are moved in ArcGIS Pro.

Procedure

Note:
An ArcGIS Pro Standard license or higher is required to create and manage attribute rules.
  1. Open the ArcGIS Pro project.
Note:
The feature layer requires Global IDs to add an attribute rule.
  1. Add the Global ID field to the attribute table of the point feature layer using the Add Global IDs tool. Refer to ArcGIS Pro: Add Global IDs (Data Management) for more information.
  2. In the Contents pane, right-click the point feature layer and click Data Design > Attribute Rules. The Attribute Rules view opens.
  3. Add attribute rules to the X and Y coordinate fields in the Attribute Rules view. In this example, the PointX field stores the X coordinates, and the PointY field stores the Y coordinates.
    1. In the Attribute Rules view, on the Calculation tab, click the Add Rule drop-down list and select Immediate Calculation.
    2. In the New Rule pane, specify a name for Rule Name. In this example, 'Calculate PointX' is used.
    3. For Description, specify a description of the new rule.
    4. For Field, click the drop-down list and select the X coordinate field. In this example, PointX is selected.
    5. In the Expression box, specify the following Arcade expression and replace <X_field> with the X coordinate field.
var shape = Geometry($feature.<X_field>);
if (isEmpty(shape)){
return null;
}
    1. Under Triggers, check the Update check box.
The Calculate PointX pane with the new rule
    1. Repeat Steps 4(a) through 4(f) to add a new rule for the Y coordinate field in the Attribute Rule view using the following Arcade expression in the Expression box and replace <Y_field> with the Y coordinate field.
var shape = Geometry($feature.<Y_field>);
if (isEmpty(shape)){
return null;
}
    1. On the Attribute Rules tab, in the Manage Edits group, click Save.

The following image shows the X and Y coordinate fields automatically return as null values after the point features are moved on the map.

The XY coordinate fields automatically returning null values when the point features are moved on the map

Article ID: 000034735

Software:
  • ArcGIS Pro 3 3
  • ArcGIS Pro 3 2
  • ArcGIS Pro 3 4

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