In AGOL I have a feature layer with Display Names, but when I go to the Visualization (data in Map Viewer) and look at the Fields or the Pop-up it uses the Field name and not the Display Name. I can't figure out a way to switch it so it uses the Display Name besides manually changing each field for the pop-up (still doesn't fix the table display in the Map Viewer)
In Mapviewer, below the popup config button, there is a Fields button.
If you go into the Fields settings, click on the field that you want to change, you can change the display name.
Which will then show the Display name in the popup as well as the table:
R_
I don't want to change the display name for every single field if the alias is set correctly. That is tedious and shouldn't be necessary if it is set at the data level.
Agree, that can be tedious.
If you want that set at the data level, then you would need to do the same tedious steps, just in the Visualization tab. That will update the data source so that when you add it to a web map it will reflect the modified values. However, since this can be overridden in the web map, any that already have it saved will show as it 'used' to be. You would have to remove and re-add that service to the map to see the new values.
In the Visualization tab, select the layers you want to modify, select the layer, click the fields button and modify as desired (be sure to click the Save button:
You will see the new alias when you switch to the Data tab and look at the table.
However, it appears as if there is a Bug or 'known limitation' that the Fields tab in the Data tab does not reflect it but is reflected when added to new maps.
R_
If you look at the screenshots above the aliases/display names are set at the data level. That is the whole issue, they aren't being honored in the visualization.
Let me add some additional details to the issue. The issue is with a particular feature service with multiple layers and creating a AGOL item. If I click on "view in AGOL viewer" from the rest end point or bring that service into Pro, the aliases are being honored. The aliases are set correctly in the service. I can see them in the Pop-ups or in the Table view. BUT, when I create an AGOL item referencing that service the aliases disappear and I have the issue that was mentioned in the original post. The service is public:
https://coast.noaa.gov/arcgis/rest/services/Hosted/south_manitou_island_2016/FeatureServer
@SupriyaK wrote:If you look at the screenshots above the aliases/display names are set at the data level. That is the whole issue, they aren't being honored in the visualization.
Actually, in the case I submitted above, I see just the opposite. Setting it in the Visualization is honored in the data table, popups, etc. but is NOT honored in the Data/Fields tab of the item details. Even though the alias's are changed in the visualization, which seems to be honored in the Data/Table, and in any popups/tables when added to a new webmap, it still shows them as the same in the Data/Fields tab.
However, as you say, if you load the link above into a new webmap, it (tables, popups) honors the alias's set in the service. But, if I create an AGOL item from it, will only display by the field name, even though the alias shows in the Display Name in Data/Fields.
But, if I go into the visualization tab of the new item (that loads this service), I can change the Display name to what I want, and it is now honored in everything EXCEPT the Data/Fields tab.
So, testing with these two feature services, it appears that changing things in the visualization tab of the item does seem to work in most places, the Display name in the Data/Fields tab in the item details is very misleading and seems to have nothing to do with what is actually displayed elsewhere so probably best to ignore what it says.
So, if I add the REST endpoint you provided into a new AGOL item and look at the Data/Table, it shows how, as you noted, they have reverted to the Field name and not the alias set in the service:
But, if you look at the Fields Tab, it shows as if the alias are preserved from the REST service:
If I go to Visualization tab of the item details and change the Display name there (I only changed the first 3 to make them obvious) and remember to Press the Save link:
then the Data/Table will show the updated Display names that were set in the Visualization tab:
BUT, if you look at the Data/Fields tab, nothing has changed:
Then, load that new AGOl item into a new webmap, and the table and popups honor the changes I made in the visualization tab:
So best to completely ignore the Data/Fields tab when testing as it seems to have nothing to do with anything.
You might consider a tech support case on this, as there definatly seems to be a bug in the system. It appears that the Data/Fields tab in the item details is honoring the field name/alias's set in the REST service, BUT, everything else is not.
R_