Using Restore Data

This support article is a supplement to our documentation Finding and safeguarding local device data.

Normally, when you submit a filled-out form to the server, it is cleared from view on the device, and there is no need to think about it on the device, since it is safely stored on the server. However, there may be times where you need those form instances back on the device. Maybe they were purged by accident, so you need to recover the data by re-submitting them to the server, or maybe you need a quick-and-easy copy of a form submission.

SurveyCTO keeps a copy of all form instances submitted in the last 30 days or so. You can make submissions visible again using the Restore Data option. Once form instances are restored, enumerators can re-submit them, edit them, or whatever else you'd like.

This support article is a comprehensive guide on how to use the Restore Data option. Most users will not need to know this, and most users who will use the Restore Data option will not need to memorize everything about it. Feel free to skim this support article to just find the information you need.

How to Restore Data

The Restore Data option is hidden by default, so that enumerators do not accidentally restore all submitted form instances and create unnecessary duplicates. To enable it, follow these steps:

  1. In SurveyCTO Collect, tap the three-dot menu in the upper-right.
  2. Tap Admin Settings.
  3. Under User can access Main Menu items, make sure Restore Data is selected.

Once the setting is enabled, tap the three-dot menu in the upper-right, and tap Restore Data.


What happens

When you Restore Data, all form instances saved on the device, including those that were recently submitted, will appear in both Edit Saved Form and Send Finalized Form. If a lot of form instances have been submitted on the device, dozens or even hundreds of form instances could be listed. To change the backup period, see Changing backup period below.

Form instances that will be recovered include:

  • Form instances that were submitted in the last 30 days
  • Form instances that were finalized, but deleted from Delete Saved Form in the last 30 days

Non-finalized form instances (e.g. form instances that did not have Mark form as finalized selected) that were deleted will not be recovered.

Working with restored data

Once you have restored form instances to the device, you can either resubmit your data, or you can create duplicate versions of your data.

Use 1: Resubmit data

You can resubmit data that has already been sent to the server. Resubmitting data can be great for recovering data, updating form instances, and more.

Keep these points in mind if you resubmit the data:

  • Resubmit form instance already on server: If you re-submit a form instance to the server without editing it, and the form instance is already on the server, the server will reject it, preventing a duplicate submission, and no submission credits will be consumed. (The word "reject" has negative connotations, but this is a good thing in this case.)
  • Edit and resubmit form instance already on server: If you edit a restored form instance, and then resubmit it, its unique identifier may change, so if you re-submit it to the server, you may create a duplicate. (When updating form instances that have already been submitted, this is why you need to delete the submission from the server before resubmitting.) Check out Create near-duplicates below to learn more.
  • Resubmit form instance deleted from server: If the submission was deleted from the server, and you resubmit it, the submission will be on the server again.
As described in our support article Recover deleted data, if you don't need to edit form instances before re-submitting them, or if the form instances have not been deleted from Delete Saved Form, it may not be necessary to use Restore Data. Instead, open the Send Finalized Form menu, tap the three-dot menu in the upper-right, tap Change View, then tap Show Sent and Unsent Forms. This will show a list of all finalized form instances saved on the device (including those more than 30 days old), and you can resubmit them to the server from there.

Use 2: Create near-duplicates

You may want to purposefully create a duplicate or a near-duplicate of a form instance, so there are two versions of it on the server. Maybe the enumerator has to go back into the form to fix some of their mistakes, but you want both versions of the form on the server. To avoid having to re-enter all of the data, they can create a near-duplicate.

Follow these steps to create a near-duplicate of form instance that is already on the server:

  1. Use Restore Data to restore the form instances.
  2. Open Edit Saved Form.
  3. Find and tap the form instance you would like to make a duplicate of (see Identifying form instances below).
  4. If you see a popup saying the submission has already been finalized, tap OK.
  5. Complete the form instance, save your changes, and re-submit it to the server when you are done.

When the form instance is re-submitted, the original version will still be on the server, and the new, updated version will also be on the server.

Of course, these are just two use cases, and you can use restored data in any way you'd like.

Identifying form instances

When you restore data, all saved form instances will appear, not just the ones you need. There are two main ways to sort through the list and identify the form instance you are looking for:

  1. Identify by the form title and ID, as well as the Finalized date and time. The form title will be in larger letters. The Finalized date and time will be the same as the "endtime" field value of that submission.
  2. Dynamically name your form instances. If your form design includes dynamic naming, then instead of naming the form instance based on the form title, it will be given a custom name based on field values in the form. That way, instead of always displaying the form title in large letters, it will display that custom name making it easier to identify. For example, you can have forms be named based on the respondent name, the case ID, or something else. To learn more, check out our documentation Dynamically naming filled-in forms.
In this screenshot, the top two form instances are a lot easier to identify, since they were filled out using a form with the instance_name property defined on the settings sheet. The bottom two forms were filled out without a dynamic form name, so the only way to differentiate them is using the Finalized date and time. You can check out the sample forms used in this folder.

If you think there is a chance you will have to restore data at any point, we strongly recommend setting up dynamic naming. That way, if an enumerator ever has to restore data, it will be easy to find the form instance they need. However, dynamic naming has to be set up before the form instance is started, but if it is not set up, you can still identify form instances using the form title and the date.

Changing backup period

By default, the Restore Data option recovers submissions from the last 30 days. You can change this in the settings:

  1. In SurveyCTO Collect, tap the three-dot menu in the upper-right.
  2. Tap General Settings.
  3. Scroll to the very bottom, and under Other settings, tap Days to auto-backup.
  4. Change the number of days to back up. The default is 30 days

If a device does not have a lot of storage, you can lower the Days to auto-backup, so that form instances are not backed up for as long. That way, space can be cleared to make room for other form instances, and SurveyCTO Collect does not use too much storage.

However, if you are using encrypted forms, we recommend increasing this to 90 days. That way, if form instances are corrupted somehow (maybe by a faulty internet connection during submission), it is easier to recover them.

The Days to auto-backup can be found at the bottom of the General Settings.

Clearing the list

Once you are done working with the restored form instances, there may still be a lot of other form instances listed under Send Finalized Form. To clear this list, you can simply re-submit them to the server, and as long as they have not been edited since being restored, if they are already on the server, they will be rejected, and no submission credits will be consumed. This is the preferred method of clearing the list.

If you prefer to remove them from the list without re-submitting them, or if the form definition of a form instance has since been deleted from the server, you can delete them from Delete Saved Form. Follow these steps carefully:

  1. Review the lists in both Edit Saved Form and Send Finalized Form, and make sure it is okay to delete the form instances in both lists. Keep in mind that non-finalized form instances cannot be recovered once they are deleted.
  2. Open Delete Saved Form.
  3. The SAVED FORMS tab should already be selected. From there, tap Toggle All.
    1. You can also just select the specific form instances you would like to delete.
  4. Tap Delete Selected.
  5. At the popup, tap DELETE FORMS.

The Send Finalized Form menu should now be cleared (or at least more clear if you only deleted specific form instances).

As mentioned before, we strongly recommend clearing the list by submitting the form instances, instead of deleting them. If you delete forms from that list, then in 30 days, you will no longer be able to re-submit those form instances to any server, which is a major part of working between servers (see section 4. Resubmitting form data from SurveyCTO Collect) and recovering deleted data (see section Recover non-deleted form instances).

But, if the form is no longer on the server (and you can't or don't want to re-add it), or you don't want that form instance on the server, then you can delete them instead. However, if there is even a small chance you will need a form instance in the future, use the resubmitting method instead.

To avoid missing data, we usually recommend simply re-submitting the form to the server. However, if the form is no longer on the server, you will either have to re-add the form to the server, or delete the form instance from Delete Saved Form.

Do you have thoughts on this support article? We'd love to hear them! Feel free to fill out this feedback form.


Please sign in to leave a comment.