I have a calculated expression that automates an ID based on spatial features and sequential numbering. This expression is set to calculate upon inserts (aka creating new points).
Smart Forms now allows you to set an expression for the editable logic. I wanted to allow edits for existing points, with the following code below. This works perfectly, however...
if($editcontext.editType == "UPDATE"){
return true
}
else{
return false
}
My problem now is I am trying to add another condition, such as if a field is filled in or not (see code below), but once I do that the calculated expression no longer works. If there is an existing ID, it completely wipes the field and the field becomes null. Is there a reason or a fix? I understand that this is likely hard to test but the problem TLDR is my calculated expression works fine UNTIL I set a specific condition for the editable logic. Any help much appreciated!
if($editcontext.editType == "UPDATE" && $feature.qaqc == "False"){
return true
}
else{
return false
}