Select to view content in your preferred language

Survey 123 vision for schema changes

1656
3
11-17-2016 02:39 PM
JakeMatthys
Frequent Contributor

As our organization begins to increasingly utilize Survey 123 for data collection, I would like ask about the vision that ESRI has for Survey 123 schema changes.  Currently a schema change means that existing data, associated with the survey undergoing a schema change, will be lost.  In the future do you envision the ability to add questions to a survey and re-publishing that survey without losing the existing data stored in the cloud?  Currently we replicate our Survey data down to our enterprise database, but we have had discussions about using the Survey 123 feature layer as our permanent storage, but we do not want that to prevent us from making survey schema changes (adding a question here or there as business needs arise).

 - Jake

3 Replies
IsmaelChivite
Esri Notable Contributor

Hi Jake.  As you describe, when changes in your survey force an underlying schema change (add new questions, change question types etc) Survey123 Connect for ArcGIS will delete your existing feature service and replace it with one that matches your new schema. This is the default behavior when the underlying feature service was originally created by Survey123 Connect.  It may be possible to handle some additional situations (such as adding questions) where we could avoid the deletion of your feature service, but we will need to explore a bit more on that one. 

The best way to protect your feature service from the behavior above is to use the submission_url setting. When you set this setting, the underlying feature service will NEVER be deleted by Survey123 Connect for ArcGIS. Instead, you will be responsible for making the necessary changes to keep your feature service schema matching the questions in your survey. To your example, if you add extra questions, Connect will not let you publish the survey again unless you add the corresponding fields in your feature service.

You can for example start by publishing your survey first. This will create your initial feature service. Immediately after, you would take the URL of your newly created feature service and then you would set it as your submission_url.

As described at the bottom of this blog post, we are  working on improvements to the whole submission_url experience in our 1.10 release, which we tentatively release before the end of the year.  If you are working with submission_url I would strongly recommend that you wait for the 1.10 release.

JakeMatthys
Frequent Contributor

Thanks for the quick reply Ismael.  That seems like a viable alternative and is a path we may pursue to allow for form flexibility while being able to retain existing data.

Thanks for explaining the best practice.

 - Jake

0 Kudos
DougBrowning
MVP Esteemed Contributor

I am running into this also.  My current plan is to download a copy first using export from AGO or whatever.  Then publish new survey.  Then edit the downloaded copy scheme to match the new one.  Then use ArcRest toolbox to append the old data up to the new HFS.

Should work but I will try to let you know when i get to it.

0 Kudos