Pre-loading data in a form

Kindly i am having problems with pre-loading data to my odk collect form, how does this work?

Thanks in advance...

1 Like

can you be specific what you want to do. Are you trying to pre-load responds from previous question or you what to pre-load information from an external file, (csv)

How to make the .csv file which can be pre-loaded to pull data from a previous survey.

Hi @Snvssh4a2017

Have you looked at this tutorial and this Ona blog post

Please provide as much information as possible so that community members will be in a better position to assist.

We encourage you to make use of the support template.

i have tried and my baseline data is very big am wondering how it will work out for me to pull data from data entered in the first time while doing my track for the same.

As much as am trying to follow that site am not getting a breakthrough about the pre-loading capability, i have also tried to use the examples provided and stillnot yet,

I've done baseline forms with tens of thousands of rows of data and haven't had issues. What specific challenges are you running into, @Snvssh4a2017?

Like what @yanokwa said, it can be done just make sure you save the for in csv format, know the csv file name, the column you want to look into, and set your calculation to pull the data.

Actually the problem is how to make a form which is capable to pull data, i have an example of an XLSForm here, lets say i fill the form how do i make it pull data in the first six rows and pre-load it assume am filling the same data for the second time.

Thanks in advance...samplepreload.xlsx (15.1 KB)

Kindly any one can help to show the settings of the calculation in the forms in that samplepreload form...

Send me your email address I will send you a sample preloaded form

Hi all,

@yanokwa and @Snvssh4a2017 this is the sample that can be useful for the baseline data collection with pre-loaded information.

this is xlsform
Sample_Baseline_2017.xlsx (42.7 KB)

this is the csv form
hhcensus_data.csv (2.2 KB)

please look at the calculation field for the pull data and make sure that yours is the same way.

explanation of the first calculation field.
pulldata(‘hhcensus_data’, ‘total_victim’, ‘hhid’, ${hhid})

type= calculate
name = total_victim
calculation = pulldata(‘hhcensus_data’, ‘total_victim’, ‘hhid’, ${hhid})
4 .‘hhcensus_data’ is the name of the csv file. (hhcensus_data.csv)
‘total_victim’ is the column in the hhcensus_data file we want to look into.
‘hhid’ is the household we want to look into in the hhcensus_data. which should match with the hhid that is selected. the hhid can also be your key. this is a unique id that identify each household and make it unique so that there will not be a conflict of choose in the dataset.
please let me know if you need any other help.
thank you,


Thank a lot @Fabla , your explanation are clear i'll doing this even i don't have this on my work.


Hi @Snvssh4a2017
If you look at the sample file i share, row 22 is the calculation that pull the household head name, i used this information (household head name ) in row 30. So in row 30 you will see the household head name which can be edited if in the census wrong person was captured as household head, but if it is the same, then you can move on. See the calculation field for row 30, it is linking to the pull data in row 22.

I hope this best solve your problem.


1 Like

Thank Fabla. Your explain is very clear. I think it is very useful for the person who questioned about CSV.


4 posts were split to a new topic: Enketo preview with external file doesn't work