1. What is the problem? Be very detailed.
Inside a repeat, I have a select_one_external of species names. It cannot be avoided that this list contains more than a thousand items. In Enketo, this is no problem because autocomplete works. In ODK app, the users are forced to scroll the entire list especially when the species names start with letters S or T, for example.
This problem is made more difficult because the repeat loop typically contains at least 5 repetitions, sometimes it my have more than 10 for each form. And in a day, at least 5 or more forms need to be filled up
If there is a way in ODK collect where users can use something like autocomplete to select a species name, it would really solve my problem
I attached a screenshot of the species list while in ODK collect.
By the way, I am using old phone with Android version 6 (Marshmallow). There is no problem with performance, the list with more than 1000 items load instantly. Its just making a selection need to be made easier. 2. What app or server are you using and on what device and operating system? Include version numbers.
I am using the latest version. I have just been using ODK this month. 3. What you have you tried to fix the problem?
I tried to use select_one_from_file and select_one_external. No difference. 4. What steps can we take to reproduce the problem?
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Hi @RaffyM and welcome in the ODK community
Yes you can do something close to autocomplete search.
Because select-widget-with-autocomplete will not be able to work in such a big list you will have to use the search() function.
But its documentation page needs to be completed
Thanks. It will work if the choices are put inside the choices sheet. But the choices are in a separate itemsets.csv file and autocomplete will not work with this configuration. And I was just following the recommendations that a long list containing more than 1000 items need to be put in a separate csv file. Still, I will try if putting such a long list in the choices sheet will not affect performance.
I have another version of the form, and the I am using select_one_from_file question type for species. It works great in Enketo where I use autocomplete.
Thanks! It works and is perfect for my need. As you said not really autocomplete but it makes selecting from a long list of species names much easier. I will make a feedback post about my experience in making this form. But later.
I would like to show how the user interface looks like with the solution i adopted.
You have to add a text question. The content of this field will be used to search the entire species name list. In my form this is named search_species
in the appearance column for the select_one field, i used this combination:
quick search('species','startswith','label',${search_species});
the seach function has these parameters:
species - the name of the csv file that contains the species names. Apparently you do not include the csv extension
startswith - how the seach is excuted. You can also use endswith, contains, and matches
label - the column in the csv file that you will search for. This column contains the species names
${search_species} - the name of the text question that contains the search string
Great. You can also have both input text and filtered list on the same screen
Think about indexing the queryied with the _key suffix on the column name...