Question on group repeat

First of all, Thank you for this amazing work. I have a question.

I am using group repeat to collect information about every household member, but there is a question that I would like to pick which household member is answering for somebody else. So "is ${name} answering for him/herself? If no --> "who is answering ?" and here I would like to present a list of household members. Can this be done?

Juan Carlos

Juan Carlos Guzman
Monitoring and Evaluation Specialist
Initiative for Global Development
University of Notre Dame
ph: 574 -631 -8456
fx: 574-631-3884

CONFIDENTIALITY STATEMENT: This message (including any attachments) is intended only for the use of the addressee and may contain information that is privileged and confidential. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient or an authorized representative of the intended recipient, the use, dissemination or reproduction of this communication is prohibited and may be a violation of federal or state law and regulations. If you have received this transmission in error, please destroy all copies of the message and its attachments and notify the sender immediately. Thank you.

Hi Juan Carlos,

There is currently no easy way to do this. Your best bet is to hire a
developer (http://opendatakit.org/help/help-for-hire/) to code up a
good workaround for your use-case. Some ideas that come to mind are to

  1. implement JR new style repeats in Collect or 2) store household
    number names in a local database and make those available to the
    prompt that lists their names.

Yaw

··· On Tue, Oct 23, 2012 at 11:49 AM, Juan Carlos Guzman wrote: > First of all, Thank you for this amazing work. I have a question. > > > > I am using group repeat to collect information about every household member, > but there is a question that I would like to pick which household member is > answering for somebody else. So “is ${name} answering for him/herself? If no > à “who is answering ?” and here I would like to present a list of household > members. Can this be done? > > > > Juan Carlos > > > > Juan Carlos Guzman > > Monitoring and Evaluation Specialist > > Initiative for Global Development > > University of Notre Dame > > ph: 574 -631 -8456 > > fx: 574-631-3884 > > > > CONFIDENTIALITY STATEMENT: This message (including any attachments) is > intended only for the use of the addressee and may contain information that > is privileged and confidential. If you are the intended recipient, further > disclosures are prohibited without proper authorization. If you are not the > intended recipient or an authorized representative of the intended > recipient, the use, dissemination or reproduction of this communication is > prohibited and may be a violation of federal or state law and regulations. > If you have received this transmission in error, please destroy all copies > of the message and its attachments and notify the sender immediately. Thank > you. > > > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Hi Yaw and Juan,
I'm also interested in the workaround. I think it's a practical situation
we usually encounter with. I would love to find out more about the first
direction but not sure how practically useful the second one is. I think in
the real world, household members can only be gotten during the interview
and 2nd direction would be useful only if we can capture and store the
names during the interview.

Thanks,
Trung.

··· On Tuesday, October 23, 2012 11:50:00 PM UTC+2, Yaw Anokwa wrote: > > Hi Juan Carlos, > > There is currently no easy way to do this. Your best bet is to hire a > developer (http://opendatakit.org/help/help-for-hire/) to code up a > good workaround for your use-case. Some ideas that come to mind are to > 1) implement JR new style repeats in Collect or 2) store household > number names in a local database and make those available to the > prompt that lists their names. > > Yaw > > > On Tue, Oct 23, 2012 at 11:49 AM, Juan Carlos Guzman <jc.g...@nd.edu> wrote: > > First of all, Thank you for this amazing work. I have a question. > > > > > > > > I am using group repeat to collect information about every household > member, > > but there is a question that I would like to pick which household member > is > > answering for somebody else. So “is ${name} answering for him/herself? > If no > > à “who is answering ?” and here I would like to present a list of > household > > members. Can this be done? > > > > > > > > Juan Carlos > > > > > > > > Juan Carlos Guzman > > > > Monitoring and Evaluation Specialist > > > > Initiative for Global Development > > > > University of Notre Dame > > > > ph: 574 -631 -8456 > > > > fx: 574-631-3884 > > > > > > > > CONFIDENTIALITY STATEMENT: This message (including any attachments) is > > intended only for the use of the addressee and may contain information > that > > is privileged and confidential. If you are the intended recipient, > further > > disclosures are prohibited without proper authorization. If you are not > the > > intended recipient or an authorized representative of the intended > > recipient, the use, dissemination or reproduction of this communication > is > > prohibited and may be a violation of federal or state law and > regulations. > > If you have received this transmission in error, please destroy all > copies > > of the message and its attachments and notify the sender immediately. > Thank > > you. > > > > > > > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en >

Trung,

Trung,

With new style repeats you can reference the variables $i and $n for
the current index and total # of repetitions, respectively. This is
ideal if you are filling out a form with repeats (say you are
gathering data on members of the household) and then after your
repeats, you want to print out the nth person in that previous repeat.
Note that this doesn't work across previously completed forms (i.e., a
return visit form that wants to list the members). New style repeats
also gives you a menu when you enter a repeating section that lists
all the existing repeats, allow you to add/remove them easily, skip
repeats, etc. The underlying JR code for this feature is done, but
there is no UI code around it in ODK Collect.

With the second approach, you could store data so it works across
forms. Done intelligently, you can use this to support hierarchies, so
you do things like have a Village form, a Household form and Person
form. Each time you fill out one of those, certain prompts can get
stored on the device in a hierarchical manner. So you can do things
like, when you are filling out a Household form, you first get a list
of villages on that phone (stored from every time you saved a Village
form), so you can associate that household to that village. And when
you are filling out a Person form, you get a list of villages. Select
a particular village, and you get a list of all the households in that
village, and then you can fill out information about that person. As a
bonus, you could also use this to build forms as a look-up so you can
select a household, a village, and a person and get information you
filled out about that person. The downside of this approach is that
you don't share this database across all phones. And if you wipe the
phone, you lose the references. Also, depending on the use case this
might not be a generic enough solution...

Hope that helps,

Yaw

··· On Wed, Oct 24, 2012 at 2:40 AM, Trung Dang Le wrote: > Hi Yaw and Juan, > I'm also interested in the workaround. I think it's a practical situation we > usually encounter with. I would love to find out more about the first > direction but not sure how practically useful the second one is. I think in > the real world, household members can only be gotten during the interview > and 2nd direction would be useful only if we can capture and store the > names during the interview. > > Thanks, > Trung. > > > On Tuesday, October 23, 2012 11:50:00 PM UTC+2, Yaw Anokwa wrote: >> >> Hi Juan Carlos, >> >> There is currently no easy way to do this. Your best bet is to hire a >> developer (http://opendatakit.org/help/help-for-hire/) to code up a >> good workaround for your use-case. Some ideas that come to mind are to >> 1) implement JR new style repeats in Collect or 2) store household >> number names in a local database and make those available to the >> prompt that lists their names. >> >> Yaw >> >> >> On Tue, Oct 23, 2012 at 11:49 AM, Juan Carlos Guzman wrote: >> > First of all, Thank you for this amazing work. I have a question. >> > >> > >> > >> > I am using group repeat to collect information about every household >> > member, >> > but there is a question that I would like to pick which household member >> > is >> > answering for somebody else. So “is ${name} answering for him/herself? >> > If no >> > à “who is answering ?” and here I would like to present a list of >> > household >> > members. Can this be done? >> > >> > >> > >> > Juan Carlos >> > >> > >> > >> > Juan Carlos Guzman >> > >> > Monitoring and Evaluation Specialist >> > >> > Initiative for Global Development >> > >> > University of Notre Dame >> > >> > ph: 574 -631 -8456 >> > >> > fx: 574-631-3884 >> > >> > >> > >> > CONFIDENTIALITY STATEMENT: This message (including any attachments) is >> > intended only for the use of the addressee and may contain information >> > that >> > is privileged and confidential. If you are the intended recipient, >> > further >> > disclosures are prohibited without proper authorization. If you are not >> > the >> > intended recipient or an authorized representative of the intended >> > recipient, the use, dissemination or reproduction of this communication >> > is >> > prohibited and may be a violation of federal or state law and >> > regulations. >> > If you have received this transmission in error, please destroy all >> > copies >> > of the message and its attachments and notify the sender immediately. >> > Thank >> > you. >> > >> > >> > >> > -- >> > Post: opend...@googlegroups.com >> > Unsubscribe: opendatakit...@googlegroups.com >> > Options: http://groups.google.com/group/opendatakit?hl=en > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Great response, Yaw. I will follow up with my guys and report back to you.
Cheers.
Trung.

··· On Wednesday, October 24, 2012 10:41:12 PM UTC+2, Yaw Anokwa wrote: > > Trung, > > Trung, > > With new style repeats you can reference the variables $i and $n for > the current index and total # of repetitions, respectively. This is > ideal if you are filling out a form with repeats (say you are > gathering data on members of the household) and then after your > repeats, you want to print out the nth person in that previous repeat. > Note that this doesn't work across previously completed forms (i.e., a > return visit form that wants to list the members). New style repeats > also gives you a menu when you enter a repeating section that lists > all the existing repeats, allow you to add/remove them easily, skip > repeats, etc. The underlying JR code for this feature is done, but > there is no UI code around it in ODK Collect. > > With the second approach, you could store data so it works across > forms. Done intelligently, you can use this to support hierarchies, so > you do things like have a Village form, a Household form and Person > form. Each time you fill out one of those, certain prompts can get > stored on the device in a hierarchical manner. So you can do things > like, when you are filling out a Household form, you first get a list > of villages on that phone (stored from every time you saved a Village > form), so you can associate that household to that village. And when > you are filling out a Person form, you get a list of villages. Select > a particular village, and you get a list of all the households in that > village, and then you can fill out information about that person. As a > bonus, you could also use this to build forms as a look-up so you can > select a household, a village, and a person and get information you > filled out about that person. The downside of this approach is that > you don't share this database across all phones. And if you wipe the > phone, you lose the references. Also, depending on the use case this > might not be a generic enough solution... > > Hope that helps, > > Yaw > > > On Wed, Oct 24, 2012 at 2:40 AM, Trung Dang Le <trung...@gmail.com> wrote: > > Hi Yaw and Juan, > > I'm also interested in the workaround. I think it's a practical > situation we > > usually encounter with. I would love to find out more about the first > > direction but not sure how practically useful the second one is. I think > in > > the real world, household members can only be gotten during the > interview > > and 2nd direction would be useful only if we can capture and store the > > names during the interview. > > > > Thanks, > > Trung. > > > > > > On Tuesday, October 23, 2012 11:50:00 PM UTC+2, Yaw Anokwa wrote: > >> > >> Hi Juan Carlos, > >> > >> There is currently no easy way to do this. Your best bet is to hire a > >> developer (http://opendatakit.org/help/help-for-hire/) to code up a > >> good workaround for your use-case. Some ideas that come to mind are to > >> 1) implement JR new style repeats in Collect or 2) store household > >> number names in a local database and make those available to the > >> prompt that lists their names. > >> > >> Yaw > >> > >> > >> On Tue, Oct 23, 2012 at 11:49 AM, Juan Carlos Guzman wrote: > >> > First of all, Thank you for this amazing work. I have a question. > >> > > >> > > >> > > >> > I am using group repeat to collect information about every household > >> > member, > >> > but there is a question that I would like to pick which household > member > >> > is > >> > answering for somebody else. So “is ${name} answering for > him/herself? > >> > If no > >> > à “who is answering ?” and here I would like to present a list of > >> > household > >> > members. Can this be done? > >> > > >> > > >> > > >> > Juan Carlos > >> > > >> > > >> > > >> > Juan Carlos Guzman > >> > > >> > Monitoring and Evaluation Specialist > >> > > >> > Initiative for Global Development > >> > > >> > University of Notre Dame > >> > > >> > ph: 574 -631 -8456 > >> > > >> > fx: 574-631-3884 > >> > > >> > > >> > > >> > CONFIDENTIALITY STATEMENT: This message (including any attachments) > is > >> > intended only for the use of the addressee and may contain > information > >> > that > >> > is privileged and confidential. If you are the intended recipient, > >> > further > >> > disclosures are prohibited without proper authorization. If you are > not > >> > the > >> > intended recipient or an authorized representative of the intended > >> > recipient, the use, dissemination or reproduction of this > communication > >> > is > >> > prohibited and may be a violation of federal or state law and > >> > regulations. > >> > If you have received this transmission in error, please destroy all > >> > copies > >> > of the message and its attachments and notify the sender immediately. > >> > Thank > >> > you. > >> > > >> > > >> > > >> > -- > >> > Post: opend...@googlegroups.com > >> > Unsubscribe: opendatakit...@googlegroups.com > >> > Options: http://groups.google.com/group/opendatakit?hl=en > > > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en >

Am I right in thinking that new style repeats are possible, but have not
been implemented in the ODK Collect interface yet? Is someone currently
working on this / will it be in ODK Collect 2.0?

New-style repeats are not implemented them in ODK Collect 1.2.x. We have no
manpower available to do so.

Code contributions for the update would be greatly appreciated (the
required code changes are all in ODK Collect).

To enable new-style repeats, you would change the constructor of
FormEntryModel to:

new FormEntryModel(formDef, FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR )

i.e., add a 2nd argument to the constructor.

For most forms, this will disable issuing EVENT_PROMPT_NEW_REPEAT and
EVENT_REPEAT, replacing both with EVENT_PROMPT_REPEAT_JUNCTURE

*HOWEVER, *if the form contains any jr:count attribute to limit the repeat
count of a repeat group, the new-style treatment is explicitly
disabled
and the older treatment and the older events are used.

Therefore, you must retain all of the old functionality in ODK Collect --
you can't rip it out.

I haven't looked, but believe the CommCare copy of ODK Collect (which is
probably a very old fork) contains an example of the new-style repeat.

Mitch

··· On Fri, Feb 15, 2013 at 12:16 AM, dj_bridges wrote:

Am I right in thinking that new style repeats are possible, but have not
been implemented in the ODK Collect interface yet? Is someone currently
working on this / will it be in ODK Collect 2.0?

--

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


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

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