Select to view content in your preferred language

Validation Rules and $originalfeature

236
2
Jump to solution
04-24-2024 02:28 PM
James_Blouin
New Contributor

Hi all. I'm attempting to write a Validation Rule that checks if the feature's geometry has changed using the $originalfeature global. I'm getting an error message when saving the rule that states that:

"The attribute rule expression contains $originalfeature, which is only valid with the update trigger for constraint and immediate calculation rules."

Has anyone encountered this as well? I'm a bit confused since the $originalfeature variable appears in the Attribute Rule Validation profile: Attribute Rule Validation | ArcGIS Arcade | ArcGIS Developers

AttRuleValidation.JPG

0 Kudos
1 Solution

Accepted Solutions
HusseinNasser2
Esri Contributor

Hey James,

 

we will have to fix that page in the doc, the Validation rules and batch calculation rules execute on demand via the evaluate call and not on user edits. 


So $originalFeature isn't applicable. 

 

If you think about it the edit has already been made, running evaluate we have no idea what happened to the feature 

 

 

View solution in original post

0 Kudos
2 Replies
HusseinNasser2
Esri Contributor

Hey James,

 

we will have to fix that page in the doc, the Validation rules and batch calculation rules execute on demand via the evaluate call and not on user edits. 


So $originalFeature isn't applicable. 

 

If you think about it the edit has already been made, running evaluate we have no idea what happened to the feature 

 

 

0 Kudos
James_Blouin
New Contributor

Thank you for the explanation, Hussein! That makes sense to me now that you mentioned that the edit has already been made before hitting the Evaluate button.

0 Kudos