Hi, I am searching an external csv file with the select one search(‘csvfile’) appearance, but my CSV file contains 8k lines (street names). It’s making the form freeze for 5 or 6 seconds when I get to this question. I tried using minimal autocomplete(‘csvfile’), with no success. Tried minimal search(‘csvfile’), and this solved the freezing problem, the list is poping up instantly, but I no longer can type a search, having to scroll down the 8k lines list to find the street. I tried using a default value for the field, but with no success.
All I want is the list to not pre load all streets and freeze the app, I need it to start showing results only after 3 or 4 typed chars typed.
Have you tried using the autocomplete in the appearance? Tryout the steps as mentioned and this should help sort out your problem:
If you are designing the form in XLSForm, you simply need to type autocomplete in the appearance column against the question.
If you are using the KoBoToolbox Formbuilder Interface, in the question, click to the setting button > Appearance (Advanced): > other > (type) autocomplete
Hey @Kal_Lam, thanks for replying my question again!
I am using Excel to create my forms, I should note that I am using the KoboCollect Android App to submit my forms.
But how am I supposed to connect the autocomplete with the external csv file?
When I use autocomplete(‘csvfile’) I get no results
select_one_external nor select_one_from_file works…
Note: in your dataset you will see 1 if you select Apple, 2 if you select Watermelon and so on. However, if you wish to see Apple, Watermelon etc. simply type Apple, Watermelon under the name as well.
Steps:
Finalize your survey forms as shown in image 1 & 2.
Finalize your choices list (for the csv file) as shown in image 3.
Upload your survey xlsform in KoBoToolbox.
Deploy your survey project.
Upload your csv file (SETTINGS>Media>Add Document).
Hi @Kal_Lam, thank you very much for your help.
Unfortunately using the search search(‘csv’) didn’t make any diference in the form (I’m using KoBoCollect), The fruits from the CSV file were showing as soon as you open the question. And when you have a 8k fruits csv, it freezes the KoboCollect App.
But I got the solution from the ODK Forum, user @mathieubossaert gave me instructions on some search() options that are not documented. Such as:
Great that you finally found out the solution. Could you be kind enough to share your xlsform with the csv file so that other community members could benefit from the issue that you lodged. THANK YOU in Advance!
Hi @percezione, I have same problem currently on this function and happy to see this solved by your discussion even a year ago but still help.
if you would to share your xlsform example only for this issue, it would be great on help me found the right example so not only me but also other members can easily understand on the practical way.
Hi @dwikps
Welcome to the community forum once again. I would like to recommend the following topic which discussed the same issue you have raised a query on.