Select_one from csv file support in ODK Collect and Enketo

1. What is the problem? Be very detailed.
I am creating an XLS Form which has select_one choices from a csv file. This form will be used in both ODK Collect and Enketo from the browser. For ODK Collect am using search(...) in appearance. For Enketo I am using select_one_from_file file.csv The problem is that the same form needs to be used by people collecting data using ODK Collect and others entering the data from the browser. Do we have type that works for both ODK Collect and Enketo or do I have to maintain two versions just because of that difference.

2. What app or server are you using and on what device and operating system? Include version numbers.
I am using both ODK Collect and Enketo

3. What you have you tried to fix the problem?
I thought select_one_from_file file.csv would work for both but only works in Enketo but in ODK Collect I get an error as shown
select_one_from_file_error

4. What steps can we take to reproduce the problem?
Attaching sample files

fruits.csv (522 Bytes) select_one_from_file.xlsx (12.4 KB)
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Hi @hnjamba, I replicated your issue but don't have an answer for you. I stripped the survey down to just the one question and it matches the XLSForm docs on getting choices from a file (as far as I can tell):

+---------------------------------+--------+-------------------------------+----------+
|              type               |  name  |             label             | required |
+---------------------------------+--------+-------------------------------+----------+
| select_one_from_file fruits.csv | fruits | What is your favorite fruit ? | TRUE     |
+---------------------------------+--------+-------------------------------+----------+

It passes https://opendatakit.org/xlsform/ just fine:

But select_one_from_file.xml (923 Bytes) errors on upload to Aggregate:

@hnjamba what version of ODK Collect are you using? Can you please try v1.26.1?

Unfortunately, Aggregate does not support external secondary instances but Central does. Since @hnjamba is getting to Collect, the server they are using does support them.

1 Like

I have tested with ODK Collect Version 1.26.1 and confirmed working from both ODK Collect and Enketo. I am hosting the form in a local installation of the latest ONA Code. Earlier was using ODK Collect Version 1.25.1

1 Like