How-to question: calling elements of a loop by their name

Dear ODKers,

A quick question from an ODK newbie: is it possible to feed
information from prior questions into the text of subsequent ones?

Here is my use case. I have a household survey where I collect the
names of everyone in the household (e.g., Joe, Mary, John). I then a
set of questions to each household member (i.e., Q1-Q3 for Joe, Q1-Q3
for Mary, Q1-Q3 for John, etc.).

Suppose my first question is: "What is [name]'s age?" Is there a way
for ODK to fill [name] in for me, based on which household member I am
currently asking about (i.e., fill in the name of the n-th person when
I am asking questions about the n-th person_?

Best,
Arthur

yes, this is possible, but it depends on how you're collecting everyone's
name first.

the easiest way is to ask all the info for a single person in one pass. that
is, name, then age, then sex, etc., before moving onto the next person.

this would have an instance like:





and controls as such:

Name What is 's age?

i think you can also structure it to ask everyone's name in one pass, then
everyone's age in a second pass. then the controls would look like this
(instance would be unchanged):

Name What is 's age?
··· On Fri, Mar 11, 2011 at 1:55 PM, Arthur wrote:

Dear ODKers,

A quick question from an ODK newbie: is it possible to feed
information from prior questions into the text of subsequent ones?

Here is my use case. I have a household survey where I collect the
names of everyone in the household (e.g., Joe, Mary, John). I then a
set of questions to each household member (i.e., Q1-Q3 for Joe, Q1-Q3
for Mary, Q1-Q3 for John, etc.).

Suppose my first question is: "What is [name]'s age?" Is there a way
for ODK to fill [name] in for me, based on which household member I am
currently asking about (i.e., fill in the name of the n-th person when
I am asking questions about the n-th person_?

Best,
Arthur

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

Many thanks, Drew. I'll be sure to give this one for a spin.

In the interim, a somewhat related question on ODK's current looping
capabilities. I seem to remember that, a few months ago, ODK encountered
problems looping over a pre-determined number of items of pre-determined
content. For example, ODK has problems asking Q10-Q15 over a loop of
exactly n pre-determined assets (e.g., bed, mattress, chair, table, charcoal
iron, etc.).

I also seem to remember that this was a JavaRosa problem (for which the ODK
team had filed a bug report).

Does the problem still stand?

Best,
Arthur

P.S.--My apologies if these questions have been answered. I've followed ODK
boards in the intervening months, but may have missed any updates relevant
to the question above.

··· On Fri, Mar 11, 2011 at 2:08 PM, Drew Roos wrote:

yes, this is possible, but it depends on how you're collecting everyone's
name first.

the easiest way is to ask all the info for a single person in one pass.
that is, name, then age, then sex, etc., before moving onto the next person.

this would have an instance like:





and controls as such:

Name What is 's age?

i think you can also structure it to ask everyone's name in one pass, then
everyone's age in a second pass. then the controls would look like this
(instance would be unchanged):

Name What is 's age?

On Fri, Mar 11, 2011 at 1:55 PM, Arthur jashaw2002@gmail.com wrote:

Dear ODKers,

A quick question from an ODK newbie: is it possible to feed
information from prior questions into the text of subsequent ones?

Here is my use case. I have a household survey where I collect the
names of everyone in the household (e.g., Joe, Mary, John). I then a
set of questions to each household member (i.e., Q1-Q3 for Joe, Q1-Q3
for Mary, Q1-Q3 for John, etc.).

Suppose my first question is: "What is [name]'s age?" Is there a way
for ODK to fill [name] in for me, based on which household member I am
currently asking about (i.e., fill in the name of the n-th person when
I am asking questions about the n-th person_?

Best,
Arthur

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

i think some of the "loop N times" problems have been solved, but others
have not. also, i forgot to add that in my examples, i was speaking with
regard to javarosa capabilities. i don't know which of these capabilities
exist in the current ODK build.

··· On Fri, Mar 11, 2011 at 2:38 PM, Arthur Shaw wrote:

Many thanks, Drew. I'll be sure to give this one for a spin.

In the interim, a somewhat related question on ODK's current looping
capabilities. I seem to remember that, a few months ago, ODK encountered
problems looping over a pre-determined number of items of pre-determined
content. For example, ODK has problems asking Q10-Q15 over a loop of
exactly n pre-determined assets (e.g., bed, mattress, chair, table, charcoal
iron, etc.).

I also seem to remember that this was a JavaRosa problem (for which the ODK
team had filed a bug report).

Does the problem still stand?

Best,
Arthur

P.S.--My apologies if these questions have been answered. I've followed
ODK boards in the intervening months, but may have missed any updates
relevant to the question above.

On Fri, Mar 11, 2011 at 2:08 PM, Drew Roos droos@dimagi.com wrote:

yes, this is possible, but it depends on how you're collecting everyone's
name first.

the easiest way is to ask all the info for a single person in one pass.
that is, name, then age, then sex, etc., before moving onto the next person.

this would have an instance like:





and controls as such:

Name What is 's age?

i think you can also structure it to ask everyone's name in one pass, then
everyone's age in a second pass. then the controls would look like this
(instance would be unchanged):

Name What is 's age?

On Fri, Mar 11, 2011 at 1:55 PM, Arthur jashaw2002@gmail.com wrote:

Dear ODKers,

A quick question from an ODK newbie: is it possible to feed
information from prior questions into the text of subsequent ones?

Here is my use case. I have a household survey where I collect the
names of everyone in the household (e.g., Joe, Mary, John). I then a
set of questions to each household member (i.e., Q1-Q3 for Joe, Q1-Q3
for Mary, Q1-Q3 for John, etc.).

Suppose my first question is: "What is [name]'s age?" Is there a way
for ODK to fill [name] in for me, based on which household member I am
currently asking about (i.e., fill in the name of the n-th person when
I am asking questions about the n-th person_?

Best,
Arthur

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en