Hosted View loses configuration after overwriting hosted feature layer

216
8
Jump to solution
2 weeks ago
Labels (1)
JoseSanchez
Occasional Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
bbollin
Esri Contributor

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

View solution in original post

0 Kudos
8 Replies
bbollin
Esri Contributor

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

0 Kudos
JoseSanchez
Occasional Contributor III

Thank you @bbollin .

 

Can I run  a "Add and update features" directly from ArcGIS Pro?

0 Kudos
bbollin
Esri Contributor

I think so but I'm not 100% sure, I focus mainly on the Online side of things

0 Kudos
JoseSanchez
Occasional Contributor III

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

 

 

0 Kudos
bbollin
Esri Contributor

@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...

- https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/updating-data-in-arcgis-onli...

0 Kudos
SanchezNuñez
Occasional Contributor

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

 

0 Kudos
bbollin
Esri Contributor

@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/...

0 Kudos