Show data when input code

kobocollect
pull-data
xlsform
#1

hi guys i wanna ask something,

i have some data in .csv and add document in kobo :
|id_key|nama_cabang|
|101|Jakarta Selatan|
|102|Tangerang|
|103|Cikupa|
|104|Serang|
|105|Sunter|

when i make some questions, can i call the data when user input 102 then show up in next question tangerang, and when 104 show up serang ?
can kobo do that ?

#2

Yes, you can use the pulldata() function to retrieve the name string corresponding to the numeric code from your csv file. See pulldata() for details how to use this in your form.

1 Like
#3

thanks for your answear, but what should i do first upload .csv and make question or make question first and upload .csv ? thanks

is my first time using kobotoolbox

#4

probably easier to get your CSV data first, then write your form’s pulldata as appropriate to get the desired pieces of data out of it.

BTW You may want to initially try this via an actual XLSForm (eg above link example), rather than attempting it via Kobo’s formbuilder GUI. Then once you are comfortable and have a simple working example, adapt it to your GUI form.

#5

okay i’m got it, thanks for your help

#6

YW. You can certainly manually enter a pulldata() in a calculation using the Kobo formbuilder GUI, but I’d probably suggest copying an existing pulldata XLSForm example first to play around with, then when you are comfortable knowing whats going on, put it in your own form [Rule #1: start with something you know should work, then modify…]

#7

if i have selected 50 data from 100, can the 50 data automatically eliminated from existing list ?