Pre-loading csv files in KoBo to cascade select

Hi community.,

I am experiencing a challenge in preloading external files on kobo server. I am currently carrying out a survey that involves districts, 150 sub counties and villages. when you select a particular regions, districts, sub counties in that district must show up. I have tried uploading the sub counties from the excel sheet to the server but it seems there is no communication between the xls forma and the external file in other words, when i select a particular region, districts show up but when i select a particular district, subcounty don’t show up . I need assistance on how to automatically select sub counties and possibly villages.

Welcome to the community @isaacmugabo! You could do the same as outlined in the images shared below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

In the csv file: state code

Image 3

In the csv file: district code

Image 4

In the csv file: village code

Data entry screen as seen in Enketo:

Reference xlsform:

select_one_from_file.xlsx (15.7 KB)

CSV file (state code):

State_Code.csv (245 Bytes)

CSV file (district code):

District_Code.csv (647 Bytes)

CSV file (village code):

Village_Code.csv (1.5 KB)

5 Likes


Hi, Kal_Lam |

  • |

Thanks very much for the response to my question. Could you kindly take me through the process of uploading these excel external files onto the kobo server so i can achieve the cascade selects. I tried to come up with the same excel files of the regions, districts and sub counties, however I have failed to upload them onto the server to achieve the cascade selects for sub counties. attached is an excel sheet and an xls form that i had designed for your perusal. Uploading them to the koboserver is my biggest challenge. Your response is highly appreciated.

Project subcounties.xlsx (33.5 KB)

questionnaire.xlsx (38.5 KB)

Maybe you could follow the steps outlined in our support article Select One or Many From External File Question Type. It should guide you how to upload csv files to the system.

2 Likes

Dear Kat_Lam, Thanks for posing this and i can follow the structure work, How can we make multi-languagecommunes.csv (65.1 KB) districts.csv (7.5 KB) NCDD_Khmer.xlsx (11.9 KB) villages.csv (628.1 KB) ,

Hi, will this work on kobo tools android app also?

@vicks88, it should work both in Enketo as well as Collect android app.

i tried in Kobo tools andoid app, it wasnt working. I tested with the same files u posted above without change, but it fails to download over kobo app

But its working in browser

Which version of the Collect android app are you using? Try using the latest version and it should work.

i just got it working,select one file got renamed to Selct one (1)…
Your solution was perfect, it was error done on my part…

Thanks a ton for your prompt response as always

1 Like

Hi Community,

Thank you for this solution on cascading select.

However, is it a requirement to have the parent items (i.e. list of countries) in the choices Tab of the xlsform instead of an external file ?

I have a similar scenario where my parent items are constitued of dozen of regions which might increase in the future like the other sub-items (countries, villages, etc) saved as csv files. So, it will be better to have also all the regions in a csv file so that other users will be able to update them directly on the Kobo server as a media file instead of downloading the xlsform for such changes.

Otherwise, what is the best way to achieve this task ?

Kind regards

Hi,

You may consider to create a form and do dynamic data pull from that form. i am not sure if it is applicable or not i haven’t tried. I assume it is applicable. By that way every user can update the form whenever needed

1 Like