I have updated the schema of a layer in a dataset being held by esri which is used in multiple maps. When I re-download the maps on collector the dataset is unchanged. The hosted feature service when consumed on desktop is updated correctly.
Do I have to re-add the feature dataset every time a schema is updated? There are a bunch of layers in the hosted dataset and I only changed one. It seems like it should auto-update since I have believed it to be pointing at the same source.
Thanks
Solved! Go to Solution.
Hello Tom,
To answer the question, yes, you will need to re-add the dataset after the schema is updated. Below is some information about how the web map interacts with layers, which should help to understand why the layer needs to be re-added when you modify the schema and where you should fix the layer.
When you create a web map, it retrieves the layer information based on the schema set in the web map or the layer in ArcGIS Online.
You can view how your web map is referring to your data layer by viewing the underlying data use a rest call :
Example:
http://www.arcgis.com/sharing/rest/content/items/20ceb44bfabf452bbf717ae9fa596724/data?f=pjson
Looking at the response, you will be able to see how your service is referred to as an operational layer in the web map. Notice how the web map refers to your layer including the item ID for the hosted feature service. When the web map refers to a layer using the itemID, it will apply any styling and pop-up information from the saved item.
If we take a look at the layer data, http://www.arcgis.com/sharing/rest/content/items/d3a177a5e41642379a1fb4100e756b2a/data?f=pjson you will see the schema of the feature service data under pop up info. If you then modify your schema (I added a new field called yummy) through the feature service admin, the layer item won't know that you have updated the feature service.
If you modify the schema through ArcGIS Online, the application will update the layer information automatically, but if you are modifying the service through the Feature service admin, then you will need to consider how to get these updates into your webmap. In my use case, if you open the layer in a new web map, select configure pop ups, make the Rating field visible and select save layer, the new field will become visible in other web maps.
If you re-add the layer directly to the web map, the new field will also be visible as it will be referenced differently.
https://services.arcgis.com/6tVsHR2ERRUR1RFd/ArcGIS/rest/services/DinersDriveTime/FeatureServer/0
How did you modify the layer?
-Kelly
Hello Tom,
To answer the question, yes, you will need to re-add the dataset after the schema is updated. Below is some information about how the web map interacts with layers, which should help to understand why the layer needs to be re-added when you modify the schema and where you should fix the layer.
When you create a web map, it retrieves the layer information based on the schema set in the web map or the layer in ArcGIS Online.
You can view how your web map is referring to your data layer by viewing the underlying data use a rest call :
Example:
http://www.arcgis.com/sharing/rest/content/items/20ceb44bfabf452bbf717ae9fa596724/data?f=pjson
Looking at the response, you will be able to see how your service is referred to as an operational layer in the web map. Notice how the web map refers to your layer including the item ID for the hosted feature service. When the web map refers to a layer using the itemID, it will apply any styling and pop-up information from the saved item.
If we take a look at the layer data, http://www.arcgis.com/sharing/rest/content/items/d3a177a5e41642379a1fb4100e756b2a/data?f=pjson you will see the schema of the feature service data under pop up info. If you then modify your schema (I added a new field called yummy) through the feature service admin, the layer item won't know that you have updated the feature service.
If you modify the schema through ArcGIS Online, the application will update the layer information automatically, but if you are modifying the service through the Feature service admin, then you will need to consider how to get these updates into your webmap. In my use case, if you open the layer in a new web map, select configure pop ups, make the Rating field visible and select save layer, the new field will become visible in other web maps.
If you re-add the layer directly to the web map, the new field will also be visible as it will be referenced differently.
https://services.arcgis.com/6tVsHR2ERRUR1RFd/ArcGIS/rest/services/DinersDriveTime/FeatureServer/0
How did you modify the layer?
-Kelly
This is great information, I will leave it as the answer.
For my particular case and question I added fields in arcgis online and they were not showing in the maps on collector. It turns out that they were added correctly but defaulted to hidden in the attribute table, I just needed to turn them on.
Slightly related question, it may need to be reasked as a new question all together. What is the best way to update the symbology of the feature service? I understand it can be altered and saved in the map but I need to update the symbology that appears when consumed into desktop via 'add data from arcgis online'
Hi Tom,
If you are updating the symbology from ArcMap, try overwriting the service. If you are updating the symbology from ArcGIS Online, use the save layer option of as feature service that you own. This will update the symbology at the feature service level.
-Kelly
Perfect thank you. That last sentence is the most important, being able to change the symbology without losing data by overwriting the feature service. Is there a help doc / list of Arcgis online symbols and which headings they are under?
Hi Tom,
This isn't listed in the ArcGIS Online documentation. Are there any particular symbols that you are looking to find?
-Kelly