Is there a way to make a schema change such as adding field and not have to create a new Survey and reload all previously collected data?

3698
6
04-25-2018 08:35 AM
WilliamWalsh1
New Contributor II

I have an existing survey with approximately 10k records, some with attachments, so without.  The challenge I face is to add a field, simple text field no more than 10 characters and republish for our users to continue using.  My understanding is that I cannot make a schema change without losing all previously collected data, thus requiring a rebuild of the survey, download of current data, publish new survey and load data.

The problem with this workflow is that I have scripts that reference CreationDate which is used as an accountability measure for when the survey is completed.  When I download an republish the current data the original CreationDate is overwritten for the SysDate, which is a major problem for historic reporting.

I would appreciate any help!!!

Thanks,

Bill

0 Kudos
6 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Bill

Please see: https://community.esri.com/groups/survey123/blog/2017/02/01/updating-field-types-in-existing-survey1... - you can add a new field to the feature service in ArcGIS Online and then create a new version of your survey.

Thanks

John

WilliamWalsh1
New Contributor II

Johnathan,

Thank you for your reply.

I am having difficulty doing this, I am still getting the message that the data will be overwritten. Can the feature service be shared when trying to make this change? Also, the field I am adding is an integer field that is required in Survey123, but I cannot change whether or not the field is required in the feature service, which is odd because I am the owner of the feature service and the survey.

I appreciate your help.

Best,

Bill Walsh

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi. Can you check your version of Survey123 Connect?

With version 2.7, Survey123 Connect can add the necessary fields in the feature services without overwriting your data.

In the old days Connect would always delete your service and recreate a new  one, but that was some time ago...

The only exception to the above rule is if adding new geopoint question within a repeat that did not have it before. Connect cannot add a SHAPE field into an existing feature layer.

JuanPeralta1
New Contributor III

Hi Ismael. Is that feature still available?

I have Survey Connect 3.2.196 and I cannot see the option to add the missing fields when I try to publish a survey with a new text field. My "Publish survey" form does not include the option ""add the following fields when publishing".

Does the feature service have any specific requirement? 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Juan,

Did Survey123 Connect create the feature service when the form was initially published, or was it using an existing feature service?  If it was an existing feature service, there is not the option to add additional fields.

JuanPeralta1
New Contributor III

Hi James,

the feature service was created from ArcGIS Pro, before publishing the Survey, so that's the reason. Thanks for your feedback.

0 Kudos