Hello,
I'm having trouble making this work on a constraint rule. I've tested the sample data from that blog post in my workspace so I know that does work. Here's the arcade I'm working with:
//Start AR Check
//add a row in the aroptions table and set 1 or 0 to enable or disable the rules
var option = first(featuresetbyname($datastore, "Attribute_Rule_Options"))
if (option != null) if (option.EnableConstraintRules == 0) return true;
//End AR Check
if (!IsEmpty($feature.assetid) && !Equals($feature.assetid, $originalFeature.assetid)) {
return false; // Prevent the update
} else if (IsEmpty($feature.assetid)){
return false;
}
else {
return true; // Allow the update
}
Nevermind, figured it out