0

I have published a number of Feature Layers (hosted) and want to make them accessible to the web via ArcGIS Enterprise Sites. I published via ArcGIS Pro 2.5.2, the data originally comes out of a SDE database and has been copied to the Datastore during the process.

Obviously, I want to add a nice description to every dataset that explains the data and also supports the search. While I have been able to get the description to work in the portal (automated with Python) (see below)...

enter image description here

.... this is not the same what I get as description in ArcGIS Enterprise Sites (see below):

enter image description here

When I click on the Layer in Portal, I see the following:

enter image description here

Obviously Sites shows the description from the layer and not the one in Portal. Is this on purpose? If yes, how is it possible to change the description? I have tried that programmatically as below:

search_result = gis.content.search(query=...)
for i in search_result:
   for f in i.layers:
   f.properties.description = i.description

and also:

for i in search_result:
      update_dict = {'Description': i.description}
      subitem = FeatureLayerCollection.fromitem(i)
      subitem.manager.update_definition(update_dict)

This seems to work, but it does not get saved. I have also tried "updateDefinition" via REST, but it did not get saved either. Any idea what I can do to make it work? Making the layer editable does not change anything. However, I can change other settings like the capabilities (Query, Extract) with the same approach as above and it gets saved.

Do I make a mistake somewhere?

2
  • 1
    Hmmmm. It works as you expect for ArcGIS.com Open Data (eg. open.ottawa.ca/datasets/parks-and-greenspace uses a mapservice and you can see the Item description vs Service Layer description difference). I wonder if its a bug in Enterprise Sites? Or perhaps some caching is going on and it hasn't refreshed the Site Item to see the updated description.
    – KHibma
    Sep 18 '20 at 18:48
  • Since it has not changed over the weekend, my guess is that it is a bug. I will check with ESRI Support.
    – Martin
    Sep 21 '20 at 9:55
1

After discussion with ESRI Support, this behavior has been identified being a bug and is now registered as #BUG-000134505: The item description is unable to be changed in the ArcGIS Enterprise site when the corresponding feature service sublayer already contains a description. 

Current Status: "In Product Plan", so it will hopefully be resolved with one of the next patches/updates

Finally I also found a workaround: When deleting the description on the CIM level of the layer, it works after being published to ArcGIS Enterprise.

cim_version = 'V2'
lyr_definition = layer.getDefinition(cim_version)
lyr_definition.description = ""
layer.setDefinition(lyr_definition)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.