Select to view content in your preferred language

Definition Query Editor: don't limit field values to first subtype domain

545
4
09-05-2023 09:57 AM
Status: Under Consideration
Labels (1)
AlfredBaldenweck
MVP Regular Contributor

Currently on 2.9, so maybe this changed.

I have a recreation site feature class divided into several subtypes, using the FET_TYPE field: Day Use, Camping, etc.

Each subtype uses a different domain for the FET_SUBTYPE field; Day Use uses the the Day Use Domain, etc.

This is all fine and good, except when I am trying to use a definition query to filter by FET_SUBTYPE, during which the simple query builder will only return the values for the first subtype, in this case Day Use Sites.

AlfredBaldenweck_0-1693930865998.png

As you can imagine, this is problematic if I'm trying to filter by different types of Camping sites.

The work around is to open the domains table, scroll through all the domains (there are a bunch), find the appropriate domain, open it, scroll to find the value(s) I want, and then go back to the definition query editor and pop in the code(s). 

I would like for the editor to return all the domains at once.

4 Comments
TanuHoque
Status changed to: Under Consideration
 
Bud
by

While you're waiting for this functionality to be implemented, would it help to create a database view that is a list of all the codes/descriptions of all of the domains used by the subtype? That could give a quick list to refer to when writing your SQL.

For example, this is how I've done it in an Oracle database view: For each domain of a subtype field, select the domain data and subtype data (using SQL)

That's only possible for enterprise geodatabases (and maybe mobile geodatabases too; not sure).

And it took me forever to figure out the SQL logic in those views. Subtypes are hard to wrap your head around.
If you're using an enterprise database other than Oracle, it would take some time to re-write the SQL for your database.

So it's not a quick solution. But maybe it's of interest, at the very least.

 

Bud
by

Or maybe you could join from your feature class to the database view (the view is a list of all the codes/descriptions of all of the domains used by the subtype), and then create your definition query using the domain code or domain description from the database view, instead of the FC.

Bud
by

Regarding:

...the simple query builder will only return the values for the first subtype...

As far as I can tell, in ArcGIS Pro 3.1.3, it's returning the values of the default subtype, not the first subtype. Not that it helps you much, it's just an observation.

Related: Clearer indication of what subtype is the default

 

Also, for what it's worth, older versions of ArcGIS Pro, such as 2.6.8, seem to behave differently than what you've described.
2.6.8 shows domain codes from multiple domains.

Bud_0-1695149999765.png

The first few values in the picklist are from a range domain (numbers). The last few values are from various coded value domains (text). So that seems to be different than how newer versions of Pro are behaving.