Grouping data

Hi all,
I'm trying to design a questionnaire using ODK build that has several layers, i.e. in 1 cluster I have several households and in households I have several individuals. I would like the questionnaire to know which cluster I'm in when I enter households, and similarly which household I'm in when I'm entering individuals so that on the final table, each household has a cluster ID and each individual has a cluster and household ID. I would need to be able to switch between households in case I need to add more information at a later time. Is this kind of grouping possible to do in ODK build (or xmlform) or is coding required?
Also, within each house I will have a form to describe the rooms in which people sleep. I would then like to select the individuals that sleep in that room from a list of individuals in that household that were entered earlier. Is that possible easily? I'm guessing the alternative would be to just ask the user to enter the room ID on the individual form but this is less neat.
Any advice would be great!
Thanks very much,Hugh

Hugh Sturrock

Hi Hugh,

You gotta write some Java in ODK Collect to do this.

I think the best approach requires three surveys -- cluster, household
and individual. When you save the cluster form, it writes the ID and
whatever information you want to an on device database. Then when you
fill in household, you get a select one prompt that pulls from the
cluster database. The same thing happens at the individual level, you
store households in the database using the household form, and when
you fill out the individual form, it pulls the list of households that
household database and the user can select which household they want.

If you need a developer to build this,
http://opendatakit.org/help/help-for-hire/ is a good place to start.

Yaw

ยทยทยท On Sat, Dec 8, 2012 at 1:41 AM, Hugh Sturrock wrote: > Hi all, > > I'm trying to design a questionnaire using ODK build that has several > layers, i.e. in 1 cluster I have several households and in households I have > several individuals. I would like the questionnaire to know which cluster > I'm in when I enter households, and similarly which household I'm in when > I'm entering individuals so that on the final table, each household has a > cluster ID and each individual has a cluster and household ID. I would need > to be able to switch between households in case I need to add more > information at a later time. Is this kind of grouping possible to do in ODK > build (or xmlform) or is coding required? > > Also, within each house I will have a form to describe the rooms in which > people sleep. I would then like to select the individuals that sleep in that > room from a list of individuals in that household that were entered earlier. > Is that possible easily? I'm guessing the alternative would be to just ask > the user to enter the room ID on the individual form but this is less neat. > > Any advice would be great! > > Thanks very much, > Hugh > > Hugh Sturrock > > >