Select to view content in your preferred language

Help creating an attribute rule that automatically Nulls an attribute when feature geometry is edited.

135
2
Jump to solution
12-11-2024 10:59 AM
MDB_GIS
Frequent Contributor

I'm fairly new to playing around with attribute rules. I am looking to have a rule that automatically nulls out two fields that store x and y geometry when a feature's geometry is changed. The reason for this is so that I can then run a GP tool later that automatically selects all features with a NULL value and calculates the new geometry for them in decimal degrees. I only want this rule to fire when the geometry of a feature is changed. Here is how I have configured the rule:

MDB_GIS_0-1733943381816.png

 

Here is my expression: 

if (!IsEmpty($feature.Lat)){
   return null;
}

 

If I'm correct, that statement essentially says "If $feature.Lat is NOT empty, then make it Null"

However the rule does nothing. If I go in and edit a point's geometry, the geometry is never set to null. 

Am I missing something?

0 Kudos
1 Solution

Accepted Solutions
TedHoward2
Esri Contributor

That looks correct to me. The Lat field should be getting nulled whenever you move a point. Maybe you have a conflicting rule or it's disabled? Make sure the rule is firing by returning a test value without the IsEmpty check.

View solution in original post

0 Kudos
2 Replies
TedHoward2
Esri Contributor

That looks correct to me. The Lat field should be getting nulled whenever you move a point. Maybe you have a conflicting rule or it's disabled? Make sure the rule is firing by returning a test value without the IsEmpty check.

0 Kudos
MDB_GIS
Frequent Contributor

It was a conflicting rule... Good grief! I'm ashamed to admit how much time this oversight cost me. Lol

0 Kudos