Good morrning,
I created a Feature Layer (hosted, view) to restrict the fields that can be updated in hosted feature layer. But when I overwrite the feature hosted layer, the fields for the Feature Layer (hosted, view) do not show in a combo box, the list of domain values associated with the field.
Is there a way to refresh the view? Do I have to delete and recreated the view each time the hosted feature layer gets updated?
Thanks
Solved! Go to Solution.
Hi @JoseSanchez, overwriting your hosted feature layer completely deletes and republishes the item and therefore can disrupt or reset certain configurations on the layer or subsequent views. Instead, try using Update Data (https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/updating-data-in-arcgis-onli...) workflows to safely update your datasets. In the article I linked there is a section about when to use overwrite vs update data that you may find helpful
Hi @JoseSanchez, overwriting your hosted feature layer completely deletes and republishes the item and therefore can disrupt or reset certain configurations on the layer or subsequent views. Instead, try using Update Data (https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/updating-data-in-arcgis-onli...) workflows to safely update your datasets. In the article I linked there is a section about when to use overwrite vs update data that you may find helpful
I think so but I'm not 100% sure, I focus mainly on the Online side of things
Additional question @bbollin
When using Update Data with Hosted features classes, do they need to have the same structure (fields)?
My source a sde feature class has less fields that the hosted feature class. Using the append from ArcGIS Pro did not work because it says that the schemas do not match. I tried also to create a view with all common fields , but it fails too.
Thanks
@JoseSanchezif you read the following blogs it will walk you through the AGOL experience but as long as the field types are compatible you can manually determine what the field mapping is
- https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/unpacking-the-new-update-dat...
Good morning @bbollin
Thank you very much four your answers,
I do have an additional question. I see that there is a way to update a hosted feature layer , adding and updating records.
What about deleting records? If there are records in the hosted feature layer that do not exist anymore in the feature class used to update. Is there a way to identify them and delete them?
Thank you
@SanchezNuñezno, update data doesn't support deleting records. If you're interested in building something a little more robust you can look into truncate and append: https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/...