Looking for some help with an Arcade expression to use as an Attribute Rule. Sometimes we copy and paste features within and/or different feature class and need a few fields that have records to show as Null in the new feature. I came up with the following expression, which verifies as valid but returns an error code when I copy/paste the feature. I have Insert trigger checked.
// Set fields to null if they have values
if (!IsEmpty("M_AssetNum") || !IsEmpty("M_InstallYear") || !IsEmpty("M_Material")) {
return {
"M_AssetNum": Null,
"M_InstallYear": Null,
"M_Material": Null
};
}
// If the fields are already empty, do nothing
return {};
This is the error message it returns after trying to paste.
