Select to view content in your preferred language

Create a point related to a polygon feature in Pro

87
3
Wednesday
HannahLegacy
New Contributor

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!

0 Kudos
3 Replies
MarkBockenhauer
Esri Regular Contributor

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.

AlfredBaldenweck
MVP Regular Contributor

Try using an attribute rule. (Also you should probably use a relationship class if you aren't already.)

AlfredBaldenweck_0-1734531348220.gif

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
    }
}

AlfredBaldenweck_1-1734531437666.png

AlfredBaldenweck_2-1734531597830.png

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.

 

Scott_Harris
Esri Regular Contributor

@HannahLegacy 

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:

Scott_Harris_0-1734622456059.png

ref: https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-relationships.htm