Select to view content in your preferred language

Update Enterprise Content Data

317
1
02-22-2023 01:24 PM
KimGarbade
Regular Contributor

We've written a scripting tool in ArcGIS Pro 3.0.1 (Python API) that allows a user to select a Layer Name from a portal using a dropdown list. The tool reports back which web maps on the portal the layer is used in.  The script works well, but we've noticed that once a layer has been removed from a web map and we run the tool again selecting the same layer name, that the map from which the layer was removed still shows up on the list of web maps the layer is used in.  Its almost like the  web maps JASON isn't being updated to reflect the changes that have been made to it.  Is their a way to refresh or update portal information so we can see the most recent web map data (I.E. showing the layer has been removed) so the map will not show up on the tools output list again?... I really don't think its a problem with the code.

0 Kudos
1 Reply
GoranGobac
New Contributor III

Hi Kim,
had similar experience but in the Portal.
So if I understood you correct you are using this script in ArcGIS Pro. Right?
Does this Problem occur if you:
Case 1
First Run the tool in ArcGIS Pro then use the Script then in Portal remove the layer and in the same session in ArcGIS Pro start the script once more.
Case 2
Is it the same when you close and open the ArcGIS Pro and run the script again.
Case 3
After the layer is removed and you open your browser in Private window is it in Map still there or is it removed.
In my experience in ArcGIS Enterprise Environment I had only problem with Portal Item Jsons when they were corrupt.
Maybe the use cases will also show you in which direction you should look for a solution.
Br
Goran