Esri / data-assistant

ArcGIS Pro Add-in that assists in emergency management, local government and state government data aggregation workflows.
Apache License 2.0
22 stars 8 forks source link

Domain Map - Unable to retrieve domain on subtype layer #136

Closed MikeMillerGIS closed 7 years ago

MikeMillerGIS commented 7 years ago

When using the domain map, if a field does not have a domain specified at the default field level and only has a domain specified at the subtype level, I am unable to retrieve a domain.

image

domanIssue.zip

@SteveGrise @previnWong

MikeMillerGIS commented 7 years ago

Repo data attached above. Field is material

MikeMillerGIS commented 7 years ago

Testing another field, it also occurs when the field has a domain, but if any subtype does not(which every field in the UN will have this as the 0/Unknown subtype is never set) it fails.

SteveGrise commented 7 years ago

Needed to check if domain == null when looping through subtypes: else if (subtypes.Count > 0) { List domainNames = new List(); for (int s = 0; s < subtypes.Count; s++) { ArcGIS.Core.Data.Subtype stype = subtypes[s]; Domain domain = thefield.GetDomain(stype); if (domain != null) {...}

previnWong commented 7 years ago

verified.