For a table that has a subtype:
The subtype fields have domains.
For example, when the ASSET_CLASS subtype value = 0 (ACTIVE_TRANSPORTATION), the ACTIVITY field uses the ACTIVITY_ATN domain.
Problem:
Just like with regular domains, subtype domains can be easily overridden via the Field Calculator and other mechanisms.
For example, 'asdf' is not a valid ACTIVITY_ATN domain code, but I can still enter that value via the Field Calculator.
Idea:
In ArcGIS, hard-enforcing subtypes and domains isn't supported, and likely won't be supported any time soon.
As a workaround, could Esri provide a sample attribute rule for enforcing subtype domains? (in the Esri Arcade GitHub)
Thanks.
I think I wrote a blog when we first introduced `Domain` Arcade function on how to do that.
The code is subtype agnostic but you should be able to get the Domain at the subtype level by passing the subtype code.
@Bud
Did the documentation provided by @HusseinNasser2 help you get to a solution here?
The short answer is: I'm not good enough with Arcade code to get that working for subtype domains.
It would be ideal to have a sample script that is specifically for enforcing a domain that comes from a subtype.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.