ODK Survey: Counting repeat sections

In ODK Survey, you can do a repeating sections thing for situations like
where you have a general household survey and then you want to ask a subset
of questions for each member of the household (Name, Age, Gender, etc.)

My question is, is there a way to validate the number of repeats? For
example, in the household survey, i ask how many people live in the house.
If there are 5 people in the house, when we go to the repeating section,
can I validate that we recorded (Name, Age, Gender) for all 5 people (no
more, no less).

Thanks,
Neil

We haven't quite figured out how we want this to be supported within the
framework.

We have a problem in that all database access is asynchronous with
completion callbacks (just like off-box ajax calls). But all relevant and
constraint predicates are synchronous.

I'm not sure if the 'agriculture' form is included in the rev 126
ApplicationDesigner zip.

If not, here is a link to it:

https://code.google.com/p/opendatakit/source/browse?repo=survey-js&name=ODK+ApplicationDesigner+2.0+Alpha-3+rev+126#hg%2Fapp%2Ftables%2Fagriculture%2Fforms%2Fagriculture%3Fstate%3Dclosed

It uses several custom prompts that implement functionality like this.
Basically, all prompt 'rendering' is an asynchronous process, enabling us
to do database interactions (or ajax calls) to get data values. In this
case, the prompts have no graphical display, but just do async database
queries.

The usage would be similar to hidden calculate fields in ODK 1.x. In this
case, however, we can do one better by defining these calculate fields as
session variables -- variables that are transient and live only for the
lifetime of the ODK Survey edit session. I.e., they waste no database
column storage space. We do this via the *model *sheet in the Excel
spreadsheet.

The custom prompt types are defined in the customPromptTypes.js file in
that form, and there is a prompt_types sheet that defines the data types
of those prompts for the XLSXConverter (for now, the converter doesn't try
to load the js file and access the information about the data type
manipulated by the prompt that is within that file -- you need to repeat
that info in the XLSX file). That file is loaded, if present, by the
framework and the prompt types become available for that specific form.

We will eventually allow these custom prompt types to be defined in one
global file, but, for now, you must copy the definitions into all forms
where you want to use them.

ยทยทยท On Sat, Mar 28, 2015 at 3:29 PM, Neil Hendrick wrote:

In ODK Survey, you can do a repeating sections thing for situations like
where you have a general household survey and then you want to ask a subset
of questions for each member of the household (Name, Age, Gender, etc.)

My question is, is there a way to validate the number of repeats? For
example, in the household survey, i ask how many people live in the house.
If there are 5 people in the house, when we go to the repeating section,
can I validate that we recorded (Name, Age, Gender) for all 5 people (no
more, no less).

Thanks,
Neil

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com