Feature Layers in ArcGIS Pro does not support DefinitionQuery using python (but used to?)

520
1
Jump to solution
02-18-2021 01:49 PM
kmsmikrud
Occasional Contributor III

Hello,

I have an ArcGIS Pro (2.7) project set up that is using feature layers from AGOL. I then have a script tool and Notebook I have been using for a number of tasks including updating definition queries for a number of layers in several of the maps. This has been working fine until today. Today the same feature layers are  not updated or even allow definition queries. In the code to help troubleshoot we checked to see if the feature layer supports definition queries:

print(lyr.name, "", lyr.supports("DEFINITIONQUERY"))

and it returns false for a number of layers. It does work for updating the definition query in the tracks layer I have in the project.

I'm so perplexed on why the feature layers no longer support definition queries using python? I can manually do this in the project, but obviously this is not what I want.

I have tried several different feature layer services and I'm running into the same issue. These are ones I shared thru ArcGIS Pro to AGOL, but the script/definition query was working last week. What could cause this change in the feature layer service for the layer to return a 'false' on supporting DEFINITIONQUERY?????

Thanks in advance!!!

Kathy

0 Kudos
1 Solution

Accepted Solutions
kmsmikrud
Occasional Contributor III

Hello,

I wanted to provide an update in case anyone else experienced this issue. I submitted a tech support case and it was found that for ArcGIS Pro 2.7 there was a bug as described below.

The bug below is now fixed in version 2.7.2

  • BUG-000137782.
  • Synopsis = Feature layers in ArcGIS Pro no longer honors the (.definitionQuery) property for the existing layers in the project if no definition query is assigned to it.

View solution in original post

1 Reply
kmsmikrud
Occasional Contributor III

Hello,

I wanted to provide an update in case anyone else experienced this issue. I submitted a tech support case and it was found that for ArcGIS Pro 2.7 there was a bug as described below.

The bug below is now fixed in version 2.7.2

  • BUG-000137782.
  • Synopsis = Feature layers in ArcGIS Pro no longer honors the (.definitionQuery) property for the existing layers in the project if no definition query is assigned to it.