I have a feature class that has an attribute called "status", and another attribute called "approved by". Obviously, when something is in the planning stage, I want "approved by" to remain null. But when the status changes to "approved", I want to require some value in "approved by".
I don't care what the user puts in that space--there are too many possibilities to create a list of domains. But I do want to require that something is put there.
Using contingent values, I can require that the "Approved by" value is <ANY> when "Status" changes to approved. But a null value seems to pass the <ANY> test.
Is there any way to require a value in "Approved by" if and only if "Status" is set to "Approved"?
You should be able to build an attribute rule for this. Constraint attribute rules—ArcGIS Pro | Documentation
Something like this might would work:
// constraint rule for a field that is non-nullable
// Triggers: Insert, Update
if($feature.status == "Approved") && IsEmpty($feature.ApprovedBy){return false}
return true