Good afternoon
I am trying to update the definition query of two layers using arcpy python
For testing purposes, I am resetting the query, but nothing happens
from arcgis.gis import GIS
from arcgis.mapping import WebMap
gis = GIS("Pro")
webmap_item = gis.content.get("-..webmapid....")
web_map = WebMap(webmap_item)
# Get all layers from the web map
for layer in web_map.layers:
print(layer.title)
if layer.title == "first layer":
layer.definitionQuery = None
if layer.title == "second layer":
layer.definitionQuery = None
webmap_item.update() ==>> It looks like this update does not work