Hello,
I am trying to edit a map that my staff use frequently to collect data in the field. In field maps, they are able to select a polygon feature and use the 'add relationship' button to add a point that is related to that polygon feature. I have a large amount of legacy data that needs to be added to the map, and it would be much easier to do this via Pro or in the Web Map.
Unfortunately, my organization still uses 10.9.1, so the option "add a related feature" is not yet available in the pop-up when I select the polygon feature.
What I've been doing in Pro is manually copying the global id from the polygon feature and pasting it into the attribute table of my new point feature, but this is quite tedious. If anyone has any workarounds, I would appreciate it. Thank you!
Does the point that you want to relate to the polygon intersect the polygon? If yes, a feature form with arcade and intersect could be used to calculate the point features relate field to be equal to the polygons globalid. This could happen in Field Maps any time a new point is added or existing point edited.
Try using an attribute rule. (Also you should probably use a relationship class if you aren't already.)
I did not make a relationship class for this example, but here's my code:
var poly = FeatureSetByName($datastore, "pol")
for (var py in poly){
if (Intersects(py, $feature)){
return py.GlobalID
}
}
I wrote this with the idea that the polygons don't intersect and that each point can only be in one polygon. If this is not the case, then it'd be more complicated.
Are you using the Attributes pane? You should be able to use the "Add Selected To Relationship" command if you select the points and the polygon. Like this:
ref: https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-relationships.htm