While Null now works in arcade field calculations on Pro 2.5, it still does not work in Attribute Rules while using the edit keyword and update.
Attribute rule dictionary keywords—Geodatabases | Documentation
return {
"result": $feature.assetid,
"edit": [{
"className": "electricdistributionassembly",
"updates": [{
"objectID": feature_objectid,
"associationType": Null
}]
}]
}
The above code will not work. It returns a what I am guessing is an empty field. It does not work on strings or dates.
I need a simple attribute rule that updates a field to "Something" on insert/update and to <Null> on insert/update on "Something Else"
My code works except that there is no way to return Null using Attribute Rules & Arcade. You can return a string, date or 0 (in the case of dates 12/30/1899).
I have set to Null and tried to set it to a field that is Null.
I am having the exact same problem and came on here to check.
I basically want to have a safety mechanism set to where the field users are protected from accidentally typing in the wrong date field in Collector, since we have multiple date fields.
I'm getting the same weird date of 12/30/1899 as well. Here is how my attribute rule is set
Have you heard anything on this yet?
I am actually trying to edit a different feature class using "Edit", which still does not work.
What you are doing does work:
{
return Null;
}
Yep, that did the trick. Thanks for the help!
I have the very same problem, i.e. returning an "edit" dictionary with null values does not work because null is converted to 0.