I have created a google sheet so that I can have multiple people editing the same sheet at the same time. I have created a hosted feature service by using the Add Item from the Cloud and selecting it from Google Drive. My table has an address and city field so that AGOL will geocode the input addresses. Works fine once the connection is created.
However, when the google sheet is updated, it doesn't dynamically update in my map, unless I go through the routine of going to Contents, Select the Hosted Feature Service, Click on the Update Data Button and Overwrite Entire Layer. I'm then prompted to sign into my Google Drive account again, then the map will update.
Can this be configured to be dynamic without constantly having to constantly Update the Data and resigning into my Google Drive?
The only way to make it seem like a "live" layer would be to schedule the update process. Thankfully, a recent update to AGOL added Notebook scheduling, so you can, quite easily!
If you're not familiar with it, you can use the ArcGIS Python API to update files, layers, and services. Once you have the notebook updating your layer properly, you can go to the Tasks panel and schedule the notebook to run at regular intervals.
Can you expand on how you did this for Google Sheets? It just returns True but does nothing when I try:
item = gis.content.get('item_id_goes_here')
item.update(data='https://drive.google.com/file/d/google_sheet_id_goes_here')
Yeah, I still can't get it to work. I'm not savvy enough to figure out how to call the google sheet, via google's cloud, using python in ArcGIS Online's notebook.
@ChuckShaw : If your locations in the google sheet are based on lat/long, if you add a point in google sheets it should automatically update. If you are geocoding the address from google sheets, it is not automatic.
They would need to be geocoded, because this would be used in an EOC scenario. No one will be calling dispatchers with lat/long coordinates in this setting. So, I would need to figure out how to trick google sheets to populate a lat/long field upon completion of a geocoded address. That's where I remain stuck. I'm working around this dead end by using Survey123 instead.