Select to view content in your preferred language

How to republish a survey when service is deleted

6407
8
Jump to solution
12-02-2015 09:03 AM
DougBrowning
MVP Esteemed Contributor

It seems that whenever I try to add a new field anywhere but the bottom of the sheet it will not change the schema of the feature service.  It will show it on the form and in Connect but not in the attribute table or schema of the HFS.  It seems to happen mostly inside a group tag.  Last time I have to delete everything, copy the excel data to a new project, fix the excel list links (you should use ranges instead) then publish fresh.

This time I tried deleting the Hosted Feature Service and the code.  Now the Survey123 site thinks it is gone but Connect still thinks it is there and will not republish.  Just hangs on "Updating survey form package step".

Is there anyway to force it to rebuilt all the service end?  Why can I not add a field after the fact?  Do I have to start over yet again?  If I have to start over how can I use the same name as before?

thanks

0 Kudos
1 Solution

Accepted Solutions
MarikaVertzonis
Esri Regular Contributor

Yes, now it is ANY change that will invoke the creation of a new service.

View solution in original post

0 Kudos
8 Replies
DougBrowning
MVP Esteemed Contributor

Well I deleted the .info and .itemInfo files on my computer in the My Survey Designs folder and the items in the debug folder and that seemed to do it.  Would be nice to know if this is correct or why I can not add fields to a group after it is published.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Just had another form I am trying to go back and edit from a few months ago.  It will show new fields I added in Connect and on the app but the Hosted Feature service will not show the new fields.  It will also not send the form now with a Code 400 error.

Why can I not add fields to my form?

thanks

0 Kudos
DougBrowning
MVP Esteemed Contributor

It could be that it can change the scheme if there are no records in the service but can not if there are records?

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi Doug,

  Starting with Survey123 Connect for ArcGIS v 1.1.30, we have changed the publishing workflow to ensure the feature service is always in sync with your questionnaire. In this manner, if you add, delete or modify questions or anything in the choices list you will always have a matching feature service.  I would suggest you install the latest version of Survey123 Connect.

  Now, it is important you understand how your feature service is kept in sync when you publish. In fact, as of 1.1.30 every time you publish (or re-publish) a new feature service is created, and the old one is deleted. This means that if you had any data in your feature service you will lose it.

Typically, re-publishing a survey is something you will do frequently until you are happy with it, but make sure you do not re-publish once you have shared the survey with people in the field.  Sharing your survey and having people submitting data to it is a point of no return.  If you really need to change the survey once people have submitted data to it, it is best to create another version of the survey and ask people to delete the one they had and start submitting to the new one.

Finally:

1) If you ever get into a situation where publishing fails due to the existence of a folder with the same name, you will need to log into ArcGIS.com or your Portal for ArcGIS, go to your contents and manually delete the entire folder for your survey. This may happen occasionally.

2) version 1.1.30 has a software defect that causes the survey folder to be called 'survey123-undefined' when you publish a survey for the very first time. If you publish a second time, then the folder will be named appropriately. We will fix this in the next few days.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Thanks I had 1.0.19 still.  I swear one of the old ones did overwrite.

Turns out you changed the name to Survery123Beta.exe and the directory.  Also it installs to the user dir for some odd reason and I have to use a separate admin account to install...but finally got it.

Are you going to change the name again?  Why default to a user dir?

I think my workflow to keep the name and records would be.

1.  Download a copy of the HFS to a GDB using REST. (or simple export to GDB in AGO)

2.  Publish new survey.

3.  Use a Append Tool in ArcMap to get the GDB records moved to the new HFS

OR use the REST toolbox append tool.

      Not sure if either of these would work with attachments.

Sound like that would work?

Thanks

0 Kudos
MarikaVertzonis
Esri Regular Contributor

Hi Doug

Firstly regarding the question of install to the user directory, this was a deliberate choice early in the design. We use a single installer framework which creates installers for all operating systems and we chose an installation pattern that could work the same everywhere. This can and may be changed in the future, but is not a high priority activity right now.

Regarding name changes - well yes at some point the beta will be removed .

Secondly, regarding your workflow - yes appending records in ArcMap is a good way to add older records (that you had archived in some way) to your current feature services.

Regards, Marika

0 Kudos
DougBrowning
MVP Esteemed Contributor

Thanks a lot.  Follow up question.  Will minor text changes also cause a wipe of the HFS?  For example to fix a typo or add some static text.  Or adding a hint, etc.

So is it ANY change to the form or just schema changes.

Thanks again

0 Kudos
MarikaVertzonis
Esri Regular Contributor

Yes, now it is ANY change that will invoke the creation of a new service.

0 Kudos