HOW TO

Auto-populate the attribute field with values of intersecting features using attribute rule in ArcGIS Pro

Last Published: September 12, 2023

Summary

In ArcGIS Pro, it is possible to copy field values from one feature to another. When working on a project involving continuous data collection, feature classes may intersect and share the same field values, and attribute rules allow users to auto-populate the attribute fields of newly created features with the values of the intersecting feature classes. This method is useful in data management and spatial analysis.

In this article, an attribute rule is applied to auto-populate the Location field (from the Lot point feature class) with the values of the Name field (from the Zone polygon feature class) when both the feature classes intersect. The attribute table for the Zone polygon feature is shown below.

Values to be copied to the attribute field of intersecting features.png

Procedure

  1. Open the ArcGIS Pro project.
  2. In the Catalog pane, browse to and right-click the feature class and click Manage.
  3. In the Feature Class Properties window, in the Manage section, check the Global IDs check box and click OK.
Enabling the Global IDs for the feature layer.png
Note:
The dataset requires Global IDs to add an attribute rule.
  1. Right-click the feature layer in the Contents pane and click Data Design > Attribute Rules.
  2. Click the Add Rule drop-down list and select Add Immediate Calculation Rule.
  3. Specify the Rule Name. In this example, Test Rule is used.
  4. For Field, select the field to use. In this example, Location is used.
  5. Insert and configure the expression below in the Expression box.
var <variable_name> = FeatureSetByName($datastore, "<feature_layer>")
for( var f in <variable_name>){
if(Intersects($feature, f)){
return f.Name}
}
  1. Replace <feature_layer> with the name of the feature layer intersecting the newly created features. In this example, the polygon layer named Zone is used.
  2. Replace <variable_name> with the preferred name. In this example, 'intersectline' is used.
  1. Under Triggers, check the preferred option. In this example, Insert and Update are checked.
  2. On the Attribute Rules tab, in the Attribute Rules group, click Save.
Attribute rule configuration window.png

The map below displays the Location field of the Lot point feature layer populated with values from the Name field of the Zone polygon feature layer when both the feature layers intersect.

Point attribute table is populated by values of intersecting polygon features.gif

Article ID: 000031093

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