Create an attribute rule to delete the containment association

585
4
03-01-2022 10:52 PM
BlazeSi
New Contributor II

Hi,

I am trying to develop an attribute rule to delete the containment association between a point feature and a line feature when the point does not intersect with the line, but I have reviewed the page - Attribute rule dictionary keywords and haven't found this capacity of Arcade. Does it have another way to do it by arcade?

Regards.

Tags (1)
0 Kudos
4 Replies
PaulLeBlanc1
Esri Contributor

You can delete associations like you would delete other features.

return {
    'edit': [{
        'className': '^UN_Association',
          'deletes': [{
            'objectID': 22
        }]
    }]
}
BlazeSi
New Contributor II

Dear Paul, 

Thanks for your reply, may I know which object id, I need to put in the "objectID", is it the container object id or the content object ID?

As I have tried to put those, both get an error "A requested row object could not be located", seems that it cannot find any record in the ^UN_Association.

Regards,

Evan

0 Kudos
PaulLeBlanc1
Esri Contributor

Neither; it is the objectID of the row in the association table.

If you have the container or the content feature, you can query the association table with https://developers.arcgis.com/arcade/function-reference/data_functions/#featuresetbyassociation

0 Kudos
JuvenalAlbertoRiaño
New Contributor

in a Utility Network that is deployed on a Oracle database de name on field of object id is OID but in the documentation apear as objectId

0 Kudos