Select to view content in your preferred language

Map rejects hosted feature layer after overwrite

7150
33
Jump to solution
12-21-2022 01:13 PM
RandyMcGregor3
Frequent Contributor

I have a hosted feature layer in ArcGIS Online that I need to periodically overwrite. It appears in four maps. When I overwrite it, all layers sourced to this feature layer become disconnected with an error message 'An error occurred loading this layer.' There is nothing wrong with the layer. No fields change. The source GIS layer is the same each time (new features are swapped out for old - and that's when I need to overwrite the layer.). I reload it and reconfigure it when this happens. This is time-consuming. 

Does anyone know what causes this? I overwrite hosted feature layers regularly and this is not a normal occurrence.

Any suggestions would be appreciated. This is very disruptive to an important workflow.

Thank you,

Randy McGregor

33 Replies
RandyMcGregor3
Frequent Contributor

This looks interesting. The first time I had this problem, one of my dashboards did get messed up and I had to change the layer id from '0' to '1' in some arcade code. The dashboard has been stable after that despite some overwrites, which is why I had said they aren't affected. Maybe they were, but changing the arcade line to access the new id was a more permanent solution for dashboards, while the maps are still getting confused. 

0 Kudos
RandyMcGregor3
Frequent Contributor

I did this on a different project that was having this problem. It worked! I was overwriting the feature layer with newly created features that were given a new layer id. I changed the layer id manually to match HFL id and had no problem overwriting it. All content that uses this layer is fine! This really is a tricky one. When you run 'Analyze' before you overwrite a feature layer, 'Layer id of input does not match layer id of layer' should be a warning. This will break content. I appreciate your help Maxwell!

0 Kudos
JamesShreeve
Occasional Contributor

Good to hear it seems to have worked for you too. Thanks for posting in the first place, glad to get a solution sorted. Completely agree, some for of warning stating that the two LayerIDs don't match would be hugely beneficial and save this sort of thing happening in the future. 

EmersonCardenasSachica
Emerging Contributor

hi Randy... one question.. where can you see the "HFL id "???  in AOL I can't find where to look! ... thanks for your help!

0 Kudos
RandyMcGregor3
Frequent Contributor

RhettZufelt answered this down below. Hope that helps. This is a huge nuisance and I hope ESRI can eliminate this problem. It causes enormous grief and it is NOT obvious what the issue is when you first experience it.

0 Kudos
EmersonCardenasSachica
Emerging Contributor

or may be is this the ID I have to put in Arcgis pro? the alphanumeric text??

RhettZufelt
MVP Notable Contributor

Probably the easiest way is to click the view URL in the item details overview page:

RhettZufelt_0-1686006666373.png

 

Any you will see the id number for each layer in that service:

RhettZufelt_1-1686006666416.png

 

 

R_

EmersonCardenasSachica
Emerging Contributor

Thanks! for your answer... i can see now the ID ... ID is 0 in AOL and ID is 0 in Arcgis Pro.. but did not work  and  now i'll try to match the los alphanumeric IDs and see if this help me!!

 

0 Kudos
EmersonCardenasSachica
Emerging Contributor

Hi... thanks to all for the answers in this question...  I have learned so much and now i know my problem...  in arcgis pro i have a Layer with Layer ID (0) ... but in Arcgis Online i have 12 maps showing me Layer ID (0) but two maps show me Layer ID (3) ... if I change the layer ID in arcgis Pro to ID (3) and overwrite the layer in AOL it correct the two layers but show error in the others 12 maps ...  the question is.... ¿can I change in AOL the layer ID form (3) to (0) to correct this two maps? ... or i have to rebuild this two maps (colors, simbology, labels, etc)? thanks for your help

0 Kudos
RandyMcGregor3
Frequent Contributor

This is what I see for the layer id in the ArcGIS Pro document: 

RandyMcGregor3_0-1672771456557.png

This is what I see in the actual feature layer:

RandyMcGregor3_2-1672771727200.png

Looks like I need to change the Layer ID in ArcGIS Pro from 2 to 0. Also, 'Allow assignment of unique ids' was NOT checked. I have checked that.

 

 

 

0 Kudos