Hi, Im trying to create a constraint that prevents a field (name_id) from being edited
I can't figure out what's wrong with this statement:
if ($feature.name_id !=$feature.name_id)
{
return false;
}
else
return true;
Thanks for the help!
Do you have more information about the issue, what is wrong with the script, or what the behavior of the script is unexpected?
Based on a cursory glance, I think you should be using the $originalfeature global to check if the edit that triggers the rule is changing the attribute for that field (name_id).
if ($feature.name_id !=$originalfeature.name_id)
Check out the blog here to learn more about the $originalfeature https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/originalfeature-new-attribute-rules-arcade-global/
Thanks, thats exactly what I was looking for!
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.