Select to view content in your preferred language

Editing a Hosted Feature Layer Containing Attribute Rules in ArcGIS Online

1153
1
06-18-2021 02:38 PM
MikeMacRae
Frequent Contributor

I created a polygon feature class in ArcGIS Pro that contains 3 text fields. I added a 2 simple Attribute Rule to two of the fields. One that just adds 2+3 when a new feature is added or an existing feature is updated and then one that jsut concatenates 2 strings together (i.e. "My" + "_test"). I validated each rule and both past validation. The tested the rules in ArcGIS Pro by adding a new record and they work. The first field updates the calculated value (5) automatically when the feature is added and the second field concatenates the strings. Same thing when the feature is edited.

My purpose was to see if those attribute rules carry over into ArcGIS Online, so I published the geodatabase containing the feature class as a hosted feature layer into AGO. I enabled editing on the settings of the hosted feature layer and then added it to a map. I tried editing the layer in the map by clicking the 'Edit' button on the layers properties and then choose 'Add a New Feature'

MikeMacRae_0-1624051538395.png

and tried clicking in the map to start drawing a new polygon. At this point the map freezes up and won't allow me to start drawing. In the image below, you can see I have editing enabled, but when I hover my cursor in the map and start clicking, nothing happens. When I try to scroll around in the map, it won't. It just freezes.

MikeMacRae_2-1624051704752.png

I tested the above in the new Map Viewer. I went on to test in the old map viewer and it will allow me to add a feature, however the attribute rules don't update the fields that are applied to.

So, question. Should attribute rules work in ArcGIS Online? If so, why is the new map viewer freezing? Why don't they seem to work in the old map viewer when I add or edit a feature? If I add a feature class with no attribute rules, I don't have an issue adding features in either map viewer.

 

 

0 Kudos
1 Reply
BrittanyBurson
Frequent Contributor

Hi @MikeMacRae as far as I know, this is not available yet for hosted feature layers in ArcGIS Online. However, it has been mentioned as a feature that will arrive in the future (hopefully Esri UC announcement?). It is mentioned at the bottom of this blog post that "Attribute rules are coming to hosted feature services and to forms so that you can execute business logic in your form connected or offline."

In the meantime, give a kudo/subscribe/follow this Idea.