Select to view content in your preferred language

Survey123 Update Deleted ALL data

298
8
Jump to solution
3 weeks ago
JessicaWalston
New Contributor II

Hello, 

I have been working on updating a survey123 and I updated an existing field to change from 255 to 1000 characters. After publishing, all of the data was removed from that survey. Is there any way I can fix this?

0 Kudos
1 Solution

Accepted Solutions
MobiusSnake
MVP Regular Contributor

There are a few ways you could do this, but your best bet might be something like this, provided you have an ArcGIS Pro license:

  • Copy the FGDB, open the copy in ArcGIS Pro and extend the field's length from 255 to 1000.
  • Close Pro and zip up the FGDB.
  • Publish the FGDB to ArcGIS Online as a new hosted feature layer.  This should have the schema you need for the new version of the survey.
  • Optional - Create a hosted feature layer view from that layer with permissions restricted.
  • In your S123 form's XLSX, go to the third tab (Settings) and change the Submission URL property to point to the hosted feature layer (or the view, if you published a view).  This page describes the details around this step (see "Author a survey that matches a feature layer" specifically).
  • Republish the survey again - it will be linked to the new hosted feature layer via the view, with all newly submitted records being appended to that data.

First thing I would do is get that FGDB backed up again though, like in Google Drive or a network drive or somewhere.  Shapefiles aren't great backups for surveys, shapefiles don't maintain all of your data - for example they don't support photos, their field lengths are limited to 255 characters (everything after gets cut off), date/time values lose their times, things like that.

View solution in original post

8 Replies
MobiusSnake
MVP Regular Contributor

This is expected behaviour in some cases, before you published did you see a warning like this one?

s123_overwrite.png

0 Kudos
JessicaWalston
New Contributor II

Yes, but I misunderstood. I was under the impression that it was for that specific field. I still have an archived data set from the previous survey. Is there a way I can merge the previous records back to the survey?

0 Kudos
MobiusSnake
MVP Regular Contributor

What format is your archive, something like a File GDB feature class?  Is your survey a single layer/table, or does it include repeats?

JessicaWalston
New Contributor II

I archived it as a shapefile, FGDB, and geopackage, but I also access to the feature layer. It has a lot of nested tables. There are associated pictures. 

 

HaydenWelch
Occasional Contributor II

Your best bet would be rebuilding it from the gdb backup in pro then republishing. If you lost your file associations you'll need to rebuild those too.

Good thinking backing everything up, it would be a nightmare if you didn't, more it's just a pain.

You're right that the warning message isn't very clear. Changing field length for a single field would logically only delete data in that field, and they should definitely have a very detailed message with a GitHub style "please type the full length of the survey name to confirm" style prompt.

0 Kudos
MobiusSnake
MVP Regular Contributor

There are a few ways you could do this, but your best bet might be something like this, provided you have an ArcGIS Pro license:

  • Copy the FGDB, open the copy in ArcGIS Pro and extend the field's length from 255 to 1000.
  • Close Pro and zip up the FGDB.
  • Publish the FGDB to ArcGIS Online as a new hosted feature layer.  This should have the schema you need for the new version of the survey.
  • Optional - Create a hosted feature layer view from that layer with permissions restricted.
  • In your S123 form's XLSX, go to the third tab (Settings) and change the Submission URL property to point to the hosted feature layer (or the view, if you published a view).  This page describes the details around this step (see "Author a survey that matches a feature layer" specifically).
  • Republish the survey again - it will be linked to the new hosted feature layer via the view, with all newly submitted records being appended to that data.

First thing I would do is get that FGDB backed up again though, like in Google Drive or a network drive or somewhere.  Shapefiles aren't great backups for surveys, shapefiles don't maintain all of your data - for example they don't support photos, their field lengths are limited to 255 characters (everything after gets cut off), date/time values lose their times, things like that.

HaydenWelch
Occasional Contributor II

I'm hoping the linked files are linked either by a URL or stored in BLOB records, rebuilding an attachment table can suck if you don't have good naming schemes.

0 Kudos
JessicaWalston
New Contributor II

Thank you for your help! I was able to link all of the data to  a new survey! You really helped save my bacon at this late hour 🙂