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:
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.
Hi Jeremy, thanks for sharing that information. And yes, I was using AGOL (we don't have Enterprise). I won't fully detail all the issues I encountered with the 'swap source' function as these are listed in the bullet points in the original post above. But to summarise, whilst the 'swap source' function seemed to work okay, the connections between the View and the two source hosted feature layers ended up being confused making ongoing management very tricky. The only solution was to delete the View, then recreate it from the updated hosted feature layer then rebuild/repair all the web maps/apps that used the View. A time-consuming process for something that should have just happened automatically through the 'swap source' function.
As mentioned above, we have set up our workflows not to use the 'swap source' function due to these reliability issues. When I get some time in the future I will test this again and see if it's more reliable nowadays. Thanks again for sharing your experiences.