Update existing form when version number was not specified on original form?

Hello,

I know there are many topics on this but I am not finding the answer to my question. I am trying to do a minor update to an existing form that has already been used many times by our partners to record their monitoring data.

I have tried to upload the newest form specifying a version number (2018080901) but I still get this message error: HTTP Status 409 – Conflict
Type Status Report

Message Form Already Exists for this Namespace/Id attribute org.opendatakit.aggregate.exception.ODKFormAlreadyExistsException

When I don't include a version number, I get the following error message: HTTP Status 409 – Conflict
Type Status Report

Message Form Already Exists for this Namespace/Id attribute org.opendatakit.aggregate.exception.ODKFormAlreadyExistsException: Form definition file has changed but does not specify a form version. Update the form version and resubmit.

Description The request could not be completed due to a conflict with the current state of the target resource.

I am not trying to make any major changes - just trying to change the age from 18 to 20. I should also mention that no version number was specified on the original form. Would that affect the upload of a modified form? If not, how should I define the version of the new form, knowing that no version number was included on the original form?

I appreciate your help.

Hi @moued

what version of ODK Aggregare do you use? I'm asking becuase I've just tried with one of my instances and I was able to update a form which originally didn't have any version number.

Hi @Grzesiek2010,

Thank you for your response. I am currently using ODK aggregate version 1.4.13

Can you please describe the steps you've taken?

I uploaded a form without any version
then I edited my form manually adding version="2" (but I tried different numbers even bigger as well) and editing question text.
then I uploaded the form again.

Did you folow the same steps?

2 Likes

No I was trying to update the XLS sheet.

I just followed your steps and it worked! Many thanks for your help!

It seems that the only way to do this is by manually applying the changes to the XLM form, instead of updating and converting the XLS sheet.

Anyways thanks again for your help @Grzesiek2010

Glad you got it working. But you should be able to change the version in the XLSForm by adding a version column to the settings sheet.

See http://xlsform.org/en/#settings-worksheet for more.

I am having the same issue - I have an xlsx form that had no version number. I added the version number to the settings sheet, and changed one question on the survey sheet, setting required to yes. I get the following error when i upload to the aggregate server:

HTTP Status 409 - Form Already Exists for this Namespace/Id attribute org.opendatakit.aggregate.exception.ODKFormAlreadyExistsException

Hi @trialsize,

Since you had no version number previously, it is impossible to replace the form with an updated one. One workaround I would suggest to try is to download all submission using Briefcase, then using the same form, with same formid, re-upload them using aggregate "Manual upload" located in submission admin menu. You can test the procedures using the aggregate test server. If you find this to be alot, I would suggest you deploy another form, with a different form ID, and have your data collectors download the new one.

Thanks @dicksonsamwel for the reply but the response(s) above (particularly from Grzesiek2020) seem to imply it can be done? Did something change in recent version of ODK Collect that no longer allows this?

No, ODK collect downloads the form that is in aggregate as uploaded. Did you try the suggestions? Also what aggregate version are you using?

An old one: v1.4.7 Production

We have thousands of records using a number of forms that need one required field change, so any way to avoid either workaround (Briefcase or new version, which has a snowball effect on processes post field data collection) is preferable. If it can't be done it can't be done, but I'm curious why it worked for some - could be just an old aggregate version issue I suppose?

Indeed you are using a very old aggregate, am not sure if that feature was available. Have you tried playing around with the test server provided?

Not yet, will give that a go when i have a moment. Thanks!

Update: tested a very dumbed-down over simplified form on the test server and it appeared to work. Seems our version of the aggregate server may not be compatible with versioning. Thanks for taking a look.

2 Likes