Select to view content in your preferred language

Attribute Rules and Editor Tracking in a Hosted Feature Layer

1466
3
07-05-2020 08:08 PM
SandraDalton
Occasional Contributor

Hello,

I have an AGOL hosted layer that keeps track of a set of point features which regularly get modified via Collector in the field. I am interested in preserving the editor tracking information in separate columns for specific events that happen to the features. 

In ArcPro I have a replica dataset that I have added attribute rules for, which is correctly copying over the Editor and EditDate information when the correct conditions are met. When I try to publish the layer up into AGOL I run into the NIM102295 bug, making the Editor/EditDate columns static and the attribute rules useless. 

- If I publish the layer with editor tracking disabled and the columns existing, the hosted layer has duplicate editor tracking fields which do not match the attribute rules. Attributes rules in AGOL are static and cannot be changed to reflect the field name changes. 

- If I publish the layer with editor tracking enabled and the columns existing, the hosted layer has no duplicate editor tracking fields, but the existing fields stop updating with the dataset effectively making them useless.

I am in a loop: I cannot save the attribute rules without the editor tracking fields existing in the table, and I cannot publish the hosted feature layer with working editor tracking unless the editor tracking fields do not exist in the table pre-publish. 

Is there a better workflow for what I am trying to do? Is there a workaround for preserving existing editor tracking fields through an AGOL publish? Some help would be appreciated. 

0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi Sandra Dalton Smith‌,

If you check on Preserve editor tracking info when publishing the layer does this resolve the issue?

Thanks,

-Peter 

0 Kudos
SandraDalton
Occasional Contributor

Hi Peter,

I sure have tried it, and it most certainly does not resolve the issue. 

0 Kudos
by Anonymous User
Not applicable

Sandra Dalton Smith‌ thanks for the reply. I figured you had but it wasn't stated explicitly so I wanted to be sure.

Checking this box is the way to preserve editor tracking fields but I did find this bug that may be interfering with its effectiveness: BUG-000129250: 'Preserve editor tracking info' does not preserve cr.. . Please don't hesitate to email me at pklingman@esri.com with your customer number and I can get your account attached.

Due to the above BUG, I think the next best option would be to use the ArcGIS API for Python's publish() function. In the publish parameters argument, pass in {"editorTrackingInfo" : {"enableEditorTracking":'true', "preserveEditUsersAndTimestamps":'true'}} to preserve the editor tracking values. This GeoNet post goes into this option further: https://community.esri.com/thread/188155-publishing-to-agol-overwrites-editor-tracking-data 

I hope this helps,

-Peter 

0 Kudos