Select to view content in your preferred language

Geometry Updates counting as 'Update' in Attribute Rules?

404
5
Jump to solution
03-28-2025 04:13 PM
JamesBooth
Regular Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
DavidSolari
MVP Regular Contributor

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.

View solution in original post

5 Replies
DavidSolari
MVP Regular Contributor

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.

0 Kudos
JamesBooth
Regular Contributor
// 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?

JamesBooth_0-1743204717524.png

 

0 Kudos
DavidSolari
MVP Regular Contributor

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.

JamesBooth
Regular Contributor

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. 

0 Kudos
JamesBooth
Regular Contributor

Turns out the edits were happening, just a bit slow and I had to refresh my view. Thanks though!