I'm trying to work out how to update a hosted feature service used by Survey123 by pushing said updates from a local geodatabase. Here's the background of what I've done and am hoping to accomplish:
I'm guessing something went wrong when I tried to update the hosted layer with the local feature class. Is there a different way to sync local changes to the hosted layer? Did I just goof up and miss a critical step or setting? Or is there no reasonable solution to the workflow I'm trying to accomplish? I can do my best to describe any of these steps in more detail if needed.
Solved! Go to Solution.
I finally got it to work! Here's the complete workflow for initial setup:
Now, I can download the recorded survey data any time I want and add any new records to the local table (need to use an SQL query during the import unless you want to duplicate older records!). Then, any time I make changes to the hydrants layer, I can share>overwrite the hosted feature service without any hiccups. Everything seems to work fine on the Survey123 website as well as the mobile app, so no more broken data!
Success!
When you did the Overwrite Web Layer in Pro - did you have both feature layer and the related table loaded into the table of contents? Also, can you share the service and database you are using to update it?
Thanks
John
I did have the table loaded in the ToC, yes.
Rather than upload the data here and/or make the service public, I shared both to a group and just invited you to it. If this doesn't work, let me know. Thanks for looking into this!
Hi Nick, can you share with jhasthorpe_survey123? Thanks
You're the only Hasthorpe to show up in a search for users to invite, so I know I have the right one. I tried sending again today from different browsers; if nothing is coming through, then I don't know what's going on, and I'm not sure how to share the data without making it public.
Hi Nick
I love the art work on your group!
I had a look at the service that you shared and can see that it does not have a related table in it. This means that when you republished the service the table and layer were not related. This is the cause of the breakage in the website.
I also tested your workflow and can confirm that overwriting the service with a downloaded version of the data should preserve the relationship between the layer and table - and not cause issues.
Thanks
John
Unfortunately, the editing of the water utility data has to remain in ArcMap 10.6, for geometric network and Attribute Assistant functionalities. Manually replicating these edits in the hosted feature service would be a major duplication of work. This is especially important since we're still in the process of building the network, so there are constant updates and additions right now.
It's odd that the the layer and table weren't related when I republished, since I was already testing the related records from the downloaded data just moments before. I guess I'll have to play around and see why that wasn't preserved during the upload.
So, when looking at it again, I noticed that a GlobalID field was added to the table as it was originally published (the Hydrants layer already had a GlobalID). Thus, when I copied the downloaded new records into the local table and tried overwriting the hosted feature service with it, that's how it broke. The local table still has no GlobalID field (just the GUID field I initially created and based the relationship class on), so the the hosted feature service and survey were looking for a relationship based on the now-missing GlobalID.
How did you get it to work when you tested it?
I finally got it to work! Here's the complete workflow for initial setup:
Now, I can download the recorded survey data any time I want and add any new records to the local table (need to use an SQL query during the import unless you want to duplicate older records!). Then, any time I make changes to the hydrants layer, I can share>overwrite the hosted feature service without any hiccups. Everything seems to work fine on the Survey123 website as well as the mobile app, so no more broken data!
Success!