Data is lost when correcting data in a submitted form

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.

Regards,
Stephane

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?

Stephane

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.

Bart

Hi,
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.

Stephane

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

Hallo Stephane,

This is what happens with the same form in Kobotoolbox, when I try to edit a submitted form the search-function within the repeat does not work.

Step 1: opening Data/table in KoboToolbox

Step2: I try to edit the upper survey in the list: the one with the species “Gladde witbol/Holcus mollis” and “Acer japonicum”.
The form opens and I see the string I entered: “holc”, but the list of species does not appear

If I hit the box where the filtered list should appear I only see this:

I tried to change the first species (repeat 1) “Gladde witbol/Holcus mollis” by entering a new string “trifol” and I choose “…”, just to see what happens

I tried to change the second species (repeat 2) “Acer japonicum” by entering a new string “Lotus” and I choose “dutchscientname_key”, just to see what happens

As a result of these tests I see that species 1 remains unchanged, and species 2 has changed to “code_key”.

Best regards,
Bart Roelandt

Hi @BartRoelandt
Aha! This is a known behaviour. Since you are using the webform to edit, it is affected by the limitation of search function which only works on the collect application. I hope this clarifies the issue you have been facing.
Stephane

1 Like

Hello Stephane,
Thank you for the clarification.
But is there a solution? Is this known imperfection something that will be fixed in a next version of KoboToolbox? Or is there a workaround by designing the form in another way?
Because this is the core-function of our form: the collecting of species-data.
Best regards,
Bart Roelandt

Hi,
Unfortunately there is no timeline for the implementation of the search functionality on Enketo which is what is used for webforms and hence editing the forms.

Stephane

1 Like

Dear Stephane

This is a very long thread which seems to take several detours into details which are not directly related to what is probably the core of the discussed aspect: Is it not possible to edit data in a form which uses an external file, like with appearance <= minimal search(‘facilities_ls’,‘contains’, ‘org_label’, *, ‘org_empty’, ${empty})? The solutions mentioned somewhere in the thread don’t seem to be related to this core question.

I think it would be very helpful for the community, if you added a short summary of the conclusion on this question. Thanks so much in advance!

1 Like

Hello,
A KoBo advice should be given? Avoid using search (and autocomplete?) option if you want to be able to edit submitted cases later on server level?

We couldn’t find a hint on this in KoBo support documentation https://support.kobotoolbox.org/question_options.html?highlight=appearance#appearance-optional and the links there.
Even not in https://xlsform.org/en/#appearance

An Enketo restriction is noted here, but only for select_multiple (should be corrected?)
https://xlsform.org/en/ref-table/ - see autocomplete.
This problem seems independent from pulldata context?

1 Like

I have the same problem as @BartRoelandt waiting for a solution. Because the solution marked in the post, does not solve it. Thank you very much in advance for your help.

@unionfuturocorp, could you provide more details on your issue so that the community should be able to help you out?