Select to view content in your preferred language

Feature Layer Field Alias

90
1
2 weeks ago
Labels (1)
gargarcia
Regular Contributor

I used the ArcGIS API for Python to update the field aliases in a hosted feature layer by creating an update JSON with my changes and applying it to the layer with fl.manager.update_definition. It works but is inconsistently updating the table in the data tab of the feature layer page. The aliases are all changed in the JSON and fields list but sometimes the data table updates and sometimes it does not. Is there any reason for this? Is there something else that controls that table?

I believe it is related to the popup definition, but unless a custom popup has been created I don't see any popup data in the layer's JSON. I think AGOL defaults to a field list of all fields.

Is there anything I am missing to update that could cause this? I think it is popup related, but I don't know where default popup info is controlled from.

0 Kudos
1 Reply
gargarcia
Regular Contributor

I think I figured out that the definition is different than the feature service item data. I used the ArcGIS Assistant to see the JSON of my feature layer and found popupInfo and fieldInfos that were not there in the service definition JSON. I will use get_data(try_json=True) on the layer item to modify the correct JSON

0 Kudos