Submissions appear half-empty when trying to edit them

I’m using the UI to edit some submissions, but in some cases, when I’m in the editing tab, the submission appears empty (90% of questions are not answered although they are required). It also appears empty when I try to edit it through the Bulk Edit screen.
The same submission seems normal and fully answered in the data table and in downloaded data.

I can’t use the Edit Single Submission method because the form is mostly empty and won’t be submitted until I re-answer all questions.
I’m afraid that if I use the Bulk Edit method to edit one answer, I would be setting all other questions to unanswered.

Any ideas?

@nartabaza, which server are you using? Could you also share the project details through a private message so that we could investigate your issue?

I’m using the Humanitarian Response server. I’m sending you the project details.

1 Like

Hi @nartabaza, I have located the issue being that some of your group names changed across versions. Data was submitted while different versions were active and therefore the column names do not match up exactly.

When one views data in the table view or in Enketo for viewing or editing, the latest version of the form is used as the model and therefore the submission’s data no longer matches up — but the export will still handle this correctly as you noted.

Unfortunately there’s no great solution for editing the affected submissions in Enketo, although it will be possible if you upload the version of the form that was deployed when the submission was made — but then you will see the same issue with your other submissions.

For example, here’s the difference in one group’s name between the latest version and the previous version:

   {
     "type": "begin_group",
-    "$kuid": "hr4BWDSoj",
-    "$autoname": "begin_group_hr4BWDSoj",
+    "$kuid": "qR1SCTWXn",
+    "$autoname": "begin_group_qR1SCTWXn",
     "appearance": "field-list"
   },

If you look at submission with _id of 317891623, you will see that it has the group name of begin_group_hr4BWDSoj and if you look at the submission with _id of 322505890, it has the group name of begin_group_qR1SCTWXn.

In the future I recommend that you always specify explicit names for all groups and questions otherwise the $autoname will update if you make changes to the label, etc. resulting in this situation.

2 Likes

This makes sense. Thanks a lot :pray:
So, follow-up question:
if I ignore the fact that the submission looks empty, and make an edit to some question, will the submission data still be preserved in the exported file? potentially with the edited question in a separate column from the original?

1 Like

Hi @nartabaza, that’s a great question. I’ve just tested that now and unfortunately the edits will only show in the export if you then create an export with the option “Include data from all X versions” unchecked — therefore using your latest form as the model for the export. But importantly, the original data is not lost, there is just additional data appended to the existing submission’s XML.

Screenshot 2022-08-19 at 10.08.58

You could then create two exports, one with it checked and another with it unchecked so that you get the original and edited data. Unfortunately this is not a great solution — sorry about that — and is something we should fix!

2 Likes

I’ve faced the multiple versions conundrum before and I guess it’s a tough one to solve from your side.
Maybe just provide a way to download (or exclude) data from specific versions to save some trouble on whomever has to deal with it.

In a previous case, I loaded submissions from all versions in one query (with Power Query) made a separate query for each version (duplicate queries as many as the versions, each filtered by the version number), unified some differences in column and group names then merged all the queries together. It’s the best I could do but it worked fine :man_shrugging:

1 Like