Data is lost when correcting data in a submitted form

The issue seems to be prevailing even while filling your survey project form. Thus, i guess it’s kind of a form design error that you are having.

Would you mind trying it out with a simple example shared in the post discussed previously:

Hello Kal Lam,
The example “Pull Data for Dates” works very well!
I filled a survey with nr 3 on ODK-collect, uploaded the survey to KoboToolbox and edited it without problem to nr 2 and it responded well.

So your idea is that the problem lies within my form - the way it is built? Or does Enketo not work well when using cascade select or repeats that use external csv’s?

Do you have an example with a cascade-select that uses an external csv that works well?
And do you have an example with a repeat that uses an external csv that works well?

Bart Roelandt

1 Like

You could try it with a cascading select question for a select_one_from_file question type as discussed in the post previously:

Hello Kal Lam,

Thank you for this link, but I would like to see an example of a cascade select that uses an external csv.
My list of items in the cascade select is 33918.
I do not think the from will work if I put such long list in the tab “choices”?

For the same reason I would like to see an example of a repeat that uses an external csv that works well

Best regards,
Bart Roelandt

Hi @BartRoelandt,

The link shared has a workaround for a cascading select with an external csv file. Have you tried them?

Could you explain us more on:

Hello Kal Lam,
Yes, I did try the example (Adding cascading question sets in XLS Form (Option 1), and it works well.
But that is a regular cascade select, where the choice-list is put in the tab “choices”.
Do you suggest I should put my list of 33918 choices in the tab “choices”?

The thing about a “repeat that uses an extarnal csv” is the second part in my form that does not work well on kobotoolbox (see my privat message to you). I will make a second form called “A test for kobo2”, which contains only that part of my form.
I will give a sign when it is uploaded and deployed, so you can see what I mean.

Bart Roelandt

Hello Kal Lam,

I did upload and deploy the form “A test for kobo2”.
This is the second part of my original form which cannot be edited in kobotoolbox.
I tried editing this shorter version of my original form but editing is still impossible.

This part of my original form is used to enter species found in a plot and then enter a coverage code for each species present in the plot.
The species are entered one by one in a repeat
The long species list (external csv with 10725 species) is filtered using a string that is entered by the surveyor.

Bart Roelandt

Regarding your issue:

No, you should manage them through the csv file as outlined in the example shared.

I do not see that in the example.
Can you copy the text here?

Now I see - I did push the link “here”, not the link “Select-one choice filter from another select_one”

1 Like

The example is a bit confusing as CDC_code is in the csv file used as items in the field “list_name” but also as fieldname of the field “CDC_Code” itself .

So I do not know what the CDC_code 's in the survey fields “name” “label” and “choice_filter” are reffering to - to the field or to the records?

Or do they all need to have the same text?

Bart Roelandt

1 Like

Would you mind having a look at our support article Adding Cascading Select Questions. It should be able to simplify your query.

Yes, I did, but that is the one example I said it was just a regular cascade select, where the choice-list is put in the tab “choices”, not in an external csv.

What I need is a cascade-select with different levels (5 levels in my case!)
With the choice-items coming from one (of more?) external csv-files (as the number of items in the choice-list is very high)
And it must be disigned such that editing is possible on the Kobotoolbox-platform (with Enketo)

Hello Kal Lam,

I did figure out where the different “CDC_Code”'s did refer to :smiley:
So I succeeded in building a 5 level cascade-select as in your example.
It works fine! And I could edit some survey’s in Kobotoolbox/Enketo.

Really good! I want to thank you again for your help!

Now I have to tackle the next problem:

  • the one with the repeat’s. Did you have the time to look at my example “A test for kobo2”?

Best regards,
Bart Roelandt

1 Like

Hi @BartRoelandt
I do hope you are fine. I work with @Kal_Lam and I am looking at your form dubbed “A test for kobo2.”. When I try running the form, I see the following

Quick query as I look through your form and specifically this part

I cannot see the csv file uploaded onto the project. Could you confirm if this has been done.

In the meantime, I would recommend a slight test to see if this will resolve your issue
search(‘soorten_hab’, ‘contains’, ‘dutchname_key, scientname_key’, ${soortk})
could you please try by forcing a search on one column to see if the issue is resolved e.g.
search(‘soorten_hab’, ‘contains’, ‘scientname_key’, ${soortk})

Most importantly, when you say this does not work within your repeat, does it mean the search does not work or the repeat does not work? PS: My response/queries above is pegged on the assumption that the search does not work.


1 Like

Hello Stephane,

Thank you very much for looking into this problem.

I use the form on mobile android devices using ODK Collect v1.28.3
It works very fine there. So the repeat works.
But when I upload survey’s to Kobotoolbox, it is impossible to edit them, as you experienced yourself. The repeat itself works, but the search does not.

The csv “soorten_hab.csv” has been uploaded, so that is not the problem.

I have changed “A test for kobo2” as you requested, and have submitted 2 surveys using ODK Collect.
I tried to edit one of the survey’s on kobotoolbox but the screen is still the same as you saw: the box “And choose it from this filtered list” is still empty. It shows only “dutchscientname_key”.
So unfortunately, this seems not the solution.

Bart Roelandt

Hi @BartRoelandt
I will need to investigate further the issue which I can sum up as follows
When working with a repeat where there is pulling response from external CSV with the search() functionalities, we do observe differently behaviours

  1. ODK Collect- Works perfectly both on repeat and search function
  2. KoBoCollect application- Does not work
  3. Enketo webform- Does not work

Kindly confirm if this presents a summary of the issue you were seeing?


1 Like

Hello Stephane,

Yes, this is a summary of the issue,
although I can not say for sure if it is the KoboToolbox application or the Enketo-Webform which is not working properly. My understanding of where the one ends and the other begins is not clear.


This functionality has some limitations as indicated in the following support article

Can you share screenshots of what you see for the different modes of data collection.


1 Like

Hello Stephane,

Yes, of course.
This is what I see in the ODKcollect-app:

Step1: adding a species

Step2: choosing a species from the species list (=external csv "soorten_hab)

Step3: filtering the long list using a string (here in this example the list is filtered using the string “holc” to obtain all the holcus-species)

Step4: choosing a species from the filtered list

These 4 steps are repeated (repeat-function) untill all species in the plot are summed up by the surveyor

Step 5: in a next step (following the repeat in the form) a coverage is given to each found species.

In my next reply I will show what happens in Kobotoolbox/Enketo

Bart Roelandt