I am using ArcGIS Pro 2.9
Using ArcPy I have to initiate multiple queries every day on 60+ layers and all these queries are piling up in Definition query tab for all these layers. I am unable to delete the queries using
lyr.definitionQuery = ""
lyr.definitionQuery = None
both just deactivate the queries.
Is there a way to reuse the existing definition query again, like if using query name, using ArcPy?
Even replacing query did not help, what I tried is as follow
Old_DT = lyr.definitionQuery New_DT = lyr.definitionQuery.replace(Old_DT,DT) lyr.definitionQuery = New_DT
Still New query is added in query definition list.