ArcGIS Pro 2.7.3
I am unable to get a definition query to work at all. No matter what attribute I try or value(s) it just isn't honored:
I can create a selection query and that works:
Is this a known problem in 2.7.3? I'm planning on an update to 2.8.2 today. Maybe I'll do that sooner than later....
Solved! Go to Solution.
Are you using the Pro SDK to define the 'definition query'? You should see on the bottom of the dialog the current active 'definition query', as shown on the screen shot below. Can you share what RDMS you are using and also a sample of you 'definition query' in sql format? If you use the Pro SDK can you share a code snippet for your 'definition query'?
Are you using the Pro SDK to define the 'definition query'? You should see on the bottom of the dialog the current active 'definition query', as shown on the screen shot below. Can you share what RDMS you are using and also a sample of you 'definition query' in sql format? If you use the Pro SDK can you share a code snippet for your 'definition query'?
I'm having this same issue but this solution did not work. The query box says that my query is active, yet it is showing other data within the layer that clearly do not fit the specified query. My select by attribute option also functions properly. Not sure what the issue is.
Can you provide the version of Pro you're using, a screenshot of the SQL Query that is not working, and sample of the rows that are displayed (use the Attribute table for that) even so they don't fulfill the query condition?
ditto
Strangely I was able to get it to work after I made a feature class copy of the layer and applied a definition query to the new layer. The original layer then updated.
The layer I was working with was actually a feature service, so I was not sure if there was a setting from the enterprise portal that was somehow overriding the definition query.
I am using ArcGIS Pro 3.0.2
OMG that's embarassing.... 😖