Hi, I created a constraint that checks if an editor has entered a valid number into a field (length of 12).
var length = Count(Text($feature.name_id));
if ((($feature.name_id!=$originalfeature.name_id) && (length!=12))
{return false}
else
{return true}
I want to modify this rule so that an editor can remove an incorrect 12 char text from the field without the rule getting triggered. I've tried different variations of this expression but it doesn't work as intended. I get an error message when I try to blank the field.
var length = Count(Text($feature.name_id));
if (($feature.name_id!=$originalfeature.name_id) && ((length!=12) || IsEmpty(length)))
{return false}
else
{return true}
Thanks in advance!