How to submit data to a new version number of an old form accidentally deleted

What is the problem? Please be detailed.
Hi all,
I accidentally deleted a certain deployed form instead of another. Data has already been gathered using this deleted form on tablets. The old form and version number is available on the tablets. But anytime I upload and deploy the same form, I notice that the newly deployed form is given an automatically generated version different from the old one hence, data submissions are returning ERROR: NOT FOUND (404) messages. .

I tried using Briefcase to pull and export the data, but ODK Briefcase will not even show the forms for me to PULL instances and EXPORT. Apparently, I read that if I removed the version column from the forms and the numerous instances, it will be resolved, but will be laborious dealing with 800 instances.
[Truth is I deployed the forms using Kobotoolbox platform but data was gathered with the ODK Collect v1.81 app because it is more stable]

  1. How do I get the old form deployed with the same version number so that submissions can begin? How else can I solve this problem? URGENT .

What ODK tool and version are you using? And on what device and operating system version?

What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Hi @BIGSTAN_ODK, it sounds like you are using KoboToolbox as your server. If you are, then you'll need to contact to get help because they handle version differently than ODK Aggregate.

Hi Yaw

Thanks for the reply. I figured it out.

1 Like

If you can, share that solution so others might learn from it.

A possible solution that works on ODK Collect for all ODK Aggregate installations (using a service like ONA, KOBO or your own aggregate installation on GoogleAppEngine or on your own machine):

#1 re-Get (=pull) the accidentally deleted form (which has a new version number now) through ODK Collect to your Android device;
#2 Backup your unsent Finalized or Draft Submissions from your ODK Collect (found as subfolders in the ODK/instances/ folder) to another safe place (SD card, notebook, PC etc.) << you don't touch this safety backup, in case you mess your things up;
#3 Make another work copy of the unsent submissions too, in which
(i) open each unsent *.xml form submission with an xml or text editor that does not append BOM to the end of file (i.e. preferably a non-Microsoft editor like Notepad++) and
(ii) replace the old form version number with the new one; and
(iii) save this modified *.xml file submission under the same name (i.e. overwriting the old one with this new one);
#4 Overwrite the corresponding original unsent Finalized or Draft Submissions (folders) in ODK Collect (i.e. in the ODK/instances folder) on your Android device;
#5 Now, if you open ODK Collect >> Edit Saved Form, you have to see unnamed submissions after ODK collect finished scanning its "instances" directory. If you open them one by one via Edit Saved Form and save them (by default, they will be marked as finalized even if they were draft submissions only), the finalized submissions will be listed under their original name again in ODK Collect and can be sent (push) to the Aggregate Server.

Hi @Bigstan I am having the same issue you had above, can you share how you were able to figure it out? Thanks

PLEASE TELL US HOW YOU SOLVED THIS ISSUE!!! I am having the EXACT same issue. The data collectors collected data with a form that had already been completely deleted from KoboTool Box, a new project was created with an identical form (and a new auto generated version number). The data collected with the old version of the form can't be sent to the server (404 error), presumably only because the auto-generated version number is different. Please help

Hi G_Fox,

Well in my case, I was using the KoboToolBox platform to host the data but ODK for the offline data collection.

Frankly, this situation offers very limited options. For data already gathered using old forms, try to use the ODK Aggregate, in the case of Kobo, Kobo Sync, to extract and aggregate all such data manually and offline. The old-versioned forms are still sitting on the mobile devices so this is possible. It is much easier, if mobile devices that used the old-versioned forms will be brought to your desk eventually. If not, I'm sure you can device your own strategy to get those data extracted and sent to your desk. Please note that for this option, the offline aggregated data may not directly be synced with the online dataset unless the latter is downloaded.

The other option - the harder one - is asking enumerators to re-input the data collected using the old-versioned form into the updated form. This may be significant if programmer or data analyst cannot have direct access to mobile devices and the need for cloud storage of an all-in-one dataset is paramount. Of course, with this option, what may worry is that GPS data might be compromised but at least the original GPS coordinates can still be extracted for keeps, where necessary.

All the best.

Thanks for response. I was able to get the data off of the tablets by using ODK Briefcase to manually extract, but the columns are slightly different than the data that made it to Kobo, which will be annoying to clean. So I will try the suggestion of Kobo Sync. Thanks