Select to view content in your preferred language

Can't Toggle Restraint Rules On and Off With Table

125
1
06-11-2025 10:35 AM
LeviCecil
Frequent Contributor

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
}

 

0 Kudos
1 Reply
LeviCecil
Frequent Contributor

Nevermind, figured it out

 

0 Kudos