Search() function with external CSV file

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:

  • startswith
  • endswith
  • contains
  • matches

search(‘csvName’, ‘contains’, ‘columnsToSearch’, ${search_string})

So what I did was: I created another question in the form, to store a search_string, and in the next question I searched the csv file for that string.

Its one more page in the form, but It’s working great.

Thansk again!

3 Likes