I recently came across a blog post by @RichNauman and @EmilyMeriam1 where they describe the process of using the Swap Source function on Hosted Feature Layer Views to manage updates to Living Atlas data. This process sounds ideal as it allows us to update data offline and only publish the changes once we've carried out the necessary verification steps.
For one of our projects this seemed the ideal way to manage updates, but we've hit a problem and hunting on this community forum it seems that we're not the only ones to have encountered this issue. This post and this post are very similar to the issue we've been experiencing.
Our setup is that we have a public-facing hosted feature layer View of point features (cafes). At the moment this View is connected to hosted feature layer A. I created a copy of the hosted feature layer, made some updates and published it as hosted feature layer B. I then used the Swap Source function to connect the public-facing View to layer B. This worked fine and the updated data is visible in the public facing web map.
However there are a few problems:
- on the details page for the View it says that it is still connected to layer A, which is incorrect;
- on the details page for layer A and layer B, they both list the View in the 'Other Views' section, but this should only be the case for layer B (layer A no longer has any 'other views');
- I can't delete layer A because it wrongly thinks it is connected to the View (the error message says 'These items have other items dependent on them. They must be deleted together.');
- I can't swap the source back to layer A because it thinks it is already connected to layer A so layer A isn't displayed in the list of available layers, aaaaargh;
- the final problem is that it makes it very hard to keep track of what the source of the View actually is, so from a data management perspective this could quickly become very annoying.
I don't hold out much hope given that the other two forum posts linked above have had no replies in the years since they were posted, but does anyone know why this is happening and how to get around it? Is there any way to force refresh the AGOL interface so that it displays the correct information? I really don't want to have to re-publish all my layers and rebuild all the various outputs. Given the Living Atlas team use the Swap Source function it seems odd that it's not reliable. I don't see how I could have done anything wrong as I'm using a single point dataset of just 18 features.
Any help would be greatly appreciated.