Hello,
Bear with me, Arcade is WAY over my knowledge level and this has been a struggle.
We have some fields in a feature class that must never be NULL/empty. We will be editing in ArcGIS Pro 3.0, not a service and whatnot. Basically I'm editing directly in the attribute table on an existing feature, and I may enter data in many fields in that feature's row, tabbing between each. I want an error to come up if somebody accidentally empties out the contents of this field.
I have come up with the code below for one field, and it's working, BUT, when the error pops up, it undoes any other edits made to that same row in the table, even though nothing was wrong with them/they didn't break rules. This will have staff fuming, so I need a nice/less sledgehammer way to have it flag an error but not undo other typing in other fields. I have tried the code below as both constraint and calculation types and still have the same hard error regardless of which rule type I use.
if (IsEmpty($feature.DisplayName) == True){
return {"errorMessage":"DisplayName must not be NULL"
}
}
Can anybody suggest more gentle way to handle errors?
Huge thanks!