The XLSForm standard supports a 'search()' function which can be used to populate select lists from csv files XLSForm.org . I have tried re-creating in Survey123 the simple sample from the XLSForm page, but I haven't been able to get it to work. Instead of the select list being populated with data from the csv file, there is a single select option that is the name of the label field in the csv file.
I can't tell if its something I am doing wrong or if its functionality that Survey123 doesn't support. If Survey123 does not support that functionality, is there a way that i can use data from csv files to populate select lists?
Thank you.
Solved! Go to Solution.
Hi Tom,
XLSForm's search() function isn't yet implemented in Survey123, sorry to say. If you want to use a CSV file to populate a select list, external selects and pulldata() are both supported.
Hi Tom,
XLSForm's search() function isn't yet implemented in Survey123, sorry to say. If you want to use a CSV file to populate a select list, external selects and pulldata() are both supported.
Thanks for the info Mitchell.
Is there an example of how i can use pulldata() to populate a select list? I have seen various examples of how to use pulldata() once a value is selected or entered, but i haven't found one yet for populating the select options. Maybe i am not looking in the right place.
I have an external select working in my survey, but i was hoping to use the pulldata() approach if its possible.
Unfortunately, Tom, that was me getting a bit confused; you can't use pulldata() to populate a select list. It's best used populating from a select list, you can't populate a select list with one. For your work, the best that can currently be provided is an external select, possibly moving to search() when that's available.
so still no search functionality for survey123?
Hi Juma,
Yes, Survey123 currently does not support the search() term. Can I ask the context in which you need support for it?
Hi James,
Thanks. I am trying to use survey123 for patient data collection (field level) and instead of creating new data for the same patient I can enter for instance UID or name and bring on screen already existing information from first visit. Also can you please help I am trying to create new survey from existing XLSF form when I push publish button the following message comes. " The survey cannot be published. Only one geometry field is allowed per table, 2 found in your file".
Hi Juma,
Based on my understanding, the search() function is not the appropriate function - search() is designed to provide choices for a select_one list based on the value of in a previous question. What you are wanting (looking up previously collected information) is supported in Survey123 with the pulldata() function.
Hi James,
Thanks , helpful will follow your direction.
Best regards,
Juma
Hi James,
Has the search() function been added, I can't find a shred of information on it