I have the following code that applies a Yes or a No to the UNIT field, determined by the UNIT_NUM field. IF the UNIT_NUM field has a value, then UNIT should be "Yes". If it is blank, then UNIT should be "No":
var unitNumber = $feature.UNIT_NUM
var hasValue
IIF(IsEmpty(unitNumber), hasValue = "No", hasValue = "Yes")
The arcade code seems to be fine, however, when I go to add a new address point, I get an error in my Create Features pane that says "Failed to create ADDR_point. Value doesn't fall within Domain: Yes_No
My Yes_No domain is set up like this and is also applied to the UNIT field of my ADDR_point feature class:
When I go to add a point, I get the error, but I also notice that when I click on the right arrow seen below...
... it opens up the attributes for the new point I'm trying to create and the UNIT field is highlighted with a "N" in the cell. Not a "No", which is what I expected. If I manually select the cell, I can choose "Yes" or "No" and the point will be produced, but I want this to be automatic. Any ideas on where I've gone wrong in any of my syntax?
Can't you just modify your editing template so it comes up as "No" instead of "N"?