From arcade-expressions/CopyValueIntersectingFeature.md at master · Esri/arcade-expressions · GitHub , I have
var intersecting_field = "GRTS_ID";
var feature_field = "GRTS_ID";
var intersecting_featset = FeatureSetByName($datastore, 'NABAT_CONUS_10x10_KM_GRID_CELLS_PRJ', [intersecting_field], true);
var intersected_feature = First(Intersects(intersecting_featset, $feature));
if (intersected_feature == null)
{
return $feature[feature_field];
}
if (IsEmpty(intersected_feature.GRTS_ID))
{
return $feature[feature_field];
}
return intersected_feature[intersecting_field];
and
Where NABAT_CONUS_10x10_KM_GRID_CELLS_PRJ is a polygon feature class with the field GRTS_ID (Type Long) and the field I'm wanting to edit in the source feature class is also GRTS_ID (Type Long).
What is happening though is on insert and update, the GRTS_ID field in the feature class being edit instead gets the ObjectID of the intersecting Polygon. 100% sure I've gotten something wrong here.