My title says it all really. I've come to realize, unless I'm doing something wrong, that my attribute rules are not being triggered to run when I move/drag a point feature class to a new XY location, despite having Insert and Update as the triggers. My understanding is that it's due to it not being an "attribute" update, rather a geometry update. I've looked around but I can't seem to find an actual solution to this. I'm surprised that this would not be built into attribute rules for Pro. When I used attribute assistant in ArcMap, geometry updates would automatically trigger the conditions there. Anyone else come across this issue?
Solved! Go to Solution.
I'm not seeing any obvious issues with the rule so maybe the backup restore process was the culprit? Another thing to check is the new "Triggering Fields" option for Attribute Rules if that's applicable.
Geometry updates absolutely count as updates, my org has dozens of rules that rely on this. Post your rule here and maybe the issue will pop out.
// Pull values from current and previous state
var applied = $feature.LarvicideApplied;
var wasApplied = $originalFeature.LarvicideApplied;
var requested = $feature.LarvicideRequest;
var pcoNotes = $feature.PCONotes;
var nfa = $feature.NFA;
// Initialize return object with current values
var result = {
"LarvicideAppliedDate": $feature.LarvicideAppliedDate,
"NFA": nfa
};
// CASE 1: Larvicide was requested, not applied, PCO left notes → NFA = 1
if (requested == 1 && applied == 0 && !IsEmpty(pcoNotes)) {
result["NFA"] = 1;
return result;
}
// CASE 2: Larvicide was applied (and wasn’t before) → set date + clear NFA
if (applied == 1 && wasApplied != 1) {
result["LarvicideAppliedDate"] = Now();
// Safety net: if NFA is 1, clear it
if (nfa == 1) {
result["NFA"] = 0;
}
}
return result;
I did notice these weird *'s in front of some of my fields. They are not actually a part of the field name. They appeared when I restored a backup of the files. I had deleted the wrong files! Could that be the issue?
I'm not seeing any obvious issues with the rule so maybe the backup restore process was the culprit? Another thing to check is the new "Triggering Fields" option for Attribute Rules if that's applicable.
Hmmm, I hope not lol! I have seen the Trigger Fields option. Unfortunately we're still on 3.3 and I believe that is a new option in 3.4.
Turns out the edits were happening, just a bit slow and I had to refresh my view. Thanks though!