I control a large database of Statewide data. I need to take the 'master' layer (a feature layer collection) and generate multiple child view layers for each county within the state. We use view layers so when we update the master layer, all the views will change with it.
Normally I can go into AGOL and do this one by one, by filtering the master by county, then saving each filtered layer independently. However there are 70 counties, and I don't want to do this by hand, and as I am learning Python, I decided to lean into it.
It started well:
I could create county views from the master layer:
I could query each newly minted view layer by county
but when I try to save the query to a new layer
ok - more then one way skin the cat - I try to delete all the unwanted features from the original child view layer
Feels like I am missing something fundamental here, but I admit to being stuck. Can anyone help?