Hi all,
I have a simple query about Attribute Rules and Editor Tracking. We have a bunch of immediate calculation attribute rules on Utility Network layers with editor tracking enabled. Attribute rules perform some data enhancements during edits made by the user in ArcGIS Pro.
We have a nightly process to perform some bulk calculations and we would like to not fire attribute rules and also not change editor tracking fields. We are using ApplyEdits REST call to perform the bulk updates. We would like attribute rules to not fire and also not change editor tracking values.
Is it possible? I would like to avoid Attribute Rule code to look for certain system user performing editing and not fire the rule if so. And it doesn't solve editor tracking problem.
I see Utility Network has UpdateSubnetwork tool that updates "SubnetworkName" field but does not fire attribute rules nor changes editor tracking values. So it must be possible somehow.
Thanks,
Vish
Solved! Go to Solution.
Could you use python to run the arcpy.DisableEditorTracking_management and arcpy.DisableAttributeRules_management, then fire off your nightly process, then arcpy.EnableAttributeRules_management and arcpy.management.EnableEditorTracking.
This would effectively turn both off so they don't fire during the nightly process, the will re-enable them when done so that they are functioning normal again.
R_
Could you use python to run the arcpy.DisableEditorTracking_management and arcpy.DisableAttributeRules_management, then fire off your nightly process, then arcpy.EnableAttributeRules_management and arcpy.management.EnableEditorTracking.
This would effectively turn both off so they don't fire during the nightly process, the will re-enable them when done so that they are functioning normal again.
R_
As a last resort, you could consider running an SQL UPDATE query in the enterprise database. That wouldn't invoke editor tracking. You could use a scheduling mechanism in the database, such as Oracle Scheduler for Oracle or your database's equivalent. Or a Windows scheduled task on the GIS server running a Python script that utilizes ArcSDESQLExecute, etc.
I'm not a DBA, I'm just aware of some functionality in the database that's often overlooked.
In addition to @RhettZufelt suggestion you could also implement "Controllers" to your attribute rules that prevent rules from firing.
Some common examples are the following:
If the field value has not change, don't run the attribute rule
if($originalFeature.field == $feature.field)) {
return
}
If the geometry has not changed, don't run the attribute rule
if (Equals(Geometry($originalFeature), Geometry($feature))) {
return;
}
You can string these together to control when these rules fire.
if ($editcontext.editType == "UPDATE" && Equals(Geometry($originalFeature),Geometry($feature)) && ($originalFeature.field == $feature.field)) {
return
}
Hope this helps.
~jake
How to Toggle Constraint and Calculation Attribute Rules on and off
A somewhat related ArcGIS Online question: Is there a way to do a Bulk Attribute Update and avoid updating the LastEdited Editor Tracking Infor...