Must re-add layer to AGOL to see table changes?

609
2
Jump to solution
09-27-2018 11:26 AM
KatyAppleton1
Occasional Contributor II

I created a new hosted feature layer via developers.arcgis.com, and added it to a map. I realised that I omitted a field, so I went in to Item Details > Data and added what I needed.

My layer was an empty, editable layer for use in Collector, and when I edited the table I had already added it to my map. This extra field did not show up for input when adding a point to this map in the field (working online). It turned out I needed to remove the layer from the map, re-add it, and then the field was available for input in Collector.

While investigating, back on a PC, I found similar behaviour in the Map view. A new field on an existing layer is not shown by default in the table, although it is listed on the Show/Hide Fields option on the table menu (but if you close the table, the 'show' setting is forgotten). If you remove and re-add the layer to the map, the field is shown in the table by default.

Is this intended behaviour? It seems odd that the new field is "there" in some ways and not in others. (I hold my hands up that I should have re-checked my map in Collector before deploying, though!)

Katy

0 Kudos
1 Solution

Accepted Solutions
MikeMinami
Esri Notable Contributor

When you first added the layer to the map, the map got the list of available fields in the layer and stored it in the map. Adding a new field later didn't alter the map's representation of the available fields. Removing the layer and adding it again caused the map to get all the available fields at that time, which included the new field.

The visible fields in the map are defined by the popup settings, which affects both the table and the popup. (See below for why this happens.) Alternatively, you could have configured the popup to show the new field (choose Configure Popup from the layer menu, then choose Configure Attributes to display the new field). Doing this will save it to the map. You can do the same thing from the layer's Visualize tab, which saves the popup configuration to the layer.

Why is field visibility in the table governed by the popup? This is a old "feature" that resulted from how ArcGIS Online developed over the years.

At first, AGOL only had a popup, no table. In defining the popup, you'd specify the visible fields you wanted to display in the popup. Then, we added the table to the map viewer. It made sense that the visible fields you displayed in the popup would also be the ones you want to display in the map viewer table, so we reused the field visibility defined in the popup for the table as well. Tables in the map viewer are somewhat transient and we thought it might be strange if the popup showed one set of fields and the table a different set. Then, we introduced the Data tab with its much more persistent table. Still, the popup governs field visibility in the Data tab table. Thus, even though you show a field from the table show/hide menu option, it will only persist while you're looking at the table. Refresh the page and it will revert back to the popup field visibility definition. We do want to decouple field visibility in the table from the popup, but just haven't done it yet. It's on the list.

Mike

View solution in original post

2 Replies
MikeMinami
Esri Notable Contributor

When you first added the layer to the map, the map got the list of available fields in the layer and stored it in the map. Adding a new field later didn't alter the map's representation of the available fields. Removing the layer and adding it again caused the map to get all the available fields at that time, which included the new field.

The visible fields in the map are defined by the popup settings, which affects both the table and the popup. (See below for why this happens.) Alternatively, you could have configured the popup to show the new field (choose Configure Popup from the layer menu, then choose Configure Attributes to display the new field). Doing this will save it to the map. You can do the same thing from the layer's Visualize tab, which saves the popup configuration to the layer.

Why is field visibility in the table governed by the popup? This is a old "feature" that resulted from how ArcGIS Online developed over the years.

At first, AGOL only had a popup, no table. In defining the popup, you'd specify the visible fields you wanted to display in the popup. Then, we added the table to the map viewer. It made sense that the visible fields you displayed in the popup would also be the ones you want to display in the map viewer table, so we reused the field visibility defined in the popup for the table as well. Tables in the map viewer are somewhat transient and we thought it might be strange if the popup showed one set of fields and the table a different set. Then, we introduced the Data tab with its much more persistent table. Still, the popup governs field visibility in the Data tab table. Thus, even though you show a field from the table show/hide menu option, it will only persist while you're looking at the table. Refresh the page and it will revert back to the popup field visibility definition. We do want to decouple field visibility in the table from the popup, but just haven't done it yet. It's on the list.

Mike

KatyAppleton1
Occasional Contributor II

I appreciate the explanation, thank you Mike.

0 Kudos