Data is lost when correcting data in a submitted form

Please refresh your page and you should be able to upload them. Would even appreciate if you could only upload the xlsform with the specific question that had an issue so that the community need not spend an entire time looking at other questions.

So only the XLS-form?
Here it is:

XLSFORM_help.xlsx (84.9 KB)

You do not need the csv’s? The form will not work without them.

Bart R

The first calculated data that is lost when opening the form in Kobotoolbox (to correct some other data) is calculated using a pull data expression “pulldata(‘select_level’, ‘code_naam’, ‘code_key’, ${domein})”
This is used to retreive data from the external csv table in a cascading select system

The second data with a problem is retrieved from a second external csv using a search expression. It searches for plantnames in the external table “soorten_hab” using a string entered in ${soortk} and looking for that string in two fields “dutchname_key” and “Scientname_key”.
search(‘soorten_hab’, ‘contains’, ‘dutchname_key, scientname_key’, ${soortk})

It looks as if Kobotoolbox cannot make the form work with the external CSV’s.

Sorry, what i meant here was that kindly please only share the specific question through the xlsform and not the entire set of questions. Also please share the csv and other files necessary.

Hello,
I have shortened the XLS-form so that it only contains the two sets of questions that give the problems.
I have tested this form and it works on ODK Collect v1.28.1 to collect the data and upload those to KoboToolbox.
But when I try to change some of the entries in Kobotoolbox (Tab “Data/table/edit”) it does not work properly and so I cannot change or correct anything.
I send also two export files. The first contains the original entry, the second one is what remains after I tried to change anything in the cacade-select questions and after I tried to change the two first plant-species names.

Thank you for your help
Bart Roelandt

export after correcting testform_-latest_version-labels-_2020-10-08-08-11-31.xlsx|attachment (6.7 KB) export with original values testform_-latest_version-labels-_2020-10-08-08-05-50.xlsx|attachment (6.7 KB) XLSFORM_help2.xlsx (26.5 KB) soorten_hab.csv (1.9 MB) select_level.csv (2.6 MB)

FYI, i just made a check and could reproduce your issue. It seems like when you have an information filled using the pulldata function in your survey form you don’t see the same while editing it in the KoBoToolbox server.

FYI,

Data is seen in the KoBoToolbox server:

The same data is missing while trying to edit through Enketo:

Will get back to you once we are confirm it it’s an issue related to KoBoToolbox or Enketo.

It seems to be an issue with KoBoToolbox! It’s already on the developer’s radar. Thank you once again for bringing this issue to the community!

For tracking you could follow the GitHub issue here:

1 Like

Hi @BartRoelandt,

The issue has now been solved with the recent announcement of the new release. FYI:

Hello Kal Lam,

Thank you for this message! This is good news. I will test it as soon as possible.

Best regards,
Bart Roelandt

1 Like

Hello again.

I did test yesterday but unfortunately nothing seems changed.
It takes already 20 to 30 minutes to open the survey I want to edit.

In the fields where a drop-down or list should appear (with the items filtered out of an external csv), nothing appears. (see printscreens)

When I want to delete an item the screen is again frozen for 20 minutes before anything happens.

So the update is not a success up till now.
Can anyone help to see what is the problem here?

Thank you,
Bart Roelandt

Hi @BartRoelandt,

Could you share with me your username, project name and the _id that is having issue through a private message. Would like to have a closer look at it and see if i am able to find any issue in it.

Yes, no problem. I will give you a test-username with all permissions on that project.
What is your private email adress - or how do I send a private message?
Bart Roelandt

Follow the post discussed previously to send a private message:

Hi @BartRoelandt,

I observed that you have 2 users where one is the admin and the other is the data_collection account. You have designed and deployed your survey project through the admin user and have shared all the features with the data_collection account. You then collected the data and then tried editing the submissions through the data_collection account.

I tried out the same in my end and it works (with my dummy project). However, i could not open your survey project as the loading was very slow due to a large volume of questions (approximately 368). Would you mind trying the same with a dummy question just to see if it works and not with the correct survey project that has 368 question.

Kindly please let us know what happens. It should work (as it worked for me at my end).

Hi Kal_Lam,
I made a new project, called “A test for kobo” in which I only retained the first part of my project that gives problems beeing edited.

You can try it yourself with the login I have sent you before.

But the result is the same (although the form opens quickly now as it is small): I cannnot edit as the dropdown are not filled with the expected items from the csv.

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: