Select options missing in select_one_from_file

We’re using select_one_from_file with a CSV file. It seems that the file is not being parsed correctly. Options that contain a comma are missing in Kobo Collect.

Here’s a screenshot to illustrate the issue. Left is Enketo where things work correctly. Right is Kobo Collect running in an Android emulator. Note that the second option is missing.

Here is a form and CSV file that reproduces the issue:
kobo-experiments.xlsx (14.3 KB)
households.csv (534 Bytes)

I’ve verified that things work correctly when removing the comma (and the quotes) from the CSV file.

Any advice for how to fix this? Do I need to format the CSV file differently?

@Sjlver, which line are you trying to refer here?

At the same time, would you also mind having a closer look at your cascading select that you have used?

Try removing the cascading selects to see the effect.

Thanks for the response! I’ve simplified my example further and removed the cascading select.

The problem still remains. As you can see in the screenshot here, Enketo and Kobo Collect parse the CSV file differently. In particular, the third option is truncated and has an extra " character in Kobo Collect.

Simplified files:
kobo-experiments.xlsx (7.6 KB)
households.csv (211 Bytes)

Maybe @Xiphware should be able to explain more on this.

Thanks for this @Sjlver. I will bring this up with the Collect team :+1:


Hi @Sjlver, you can track the issue here: Support quotes, escaped commas, and other CSV formatting in external CSV files · Issue #616 · getodk/javarosa · GitHub (they are in the process of improving their CSV parsing)