Repeat group and required question issue

Dear all,

I have an issue regarding my ODK questionnaire. I am running a household
survey: on ODK I have included a "begin repeat" function to repeat the same
questions for each hh member. I have also included a repeat_count column so
that I first ask " how many people live in the hh"? and then the program
automatically create as many loop as hh members.

My problem is : if an enumerator makes a mistake in the question " how many
people live in the hh"? and insert 50 instead of 5, the program creates 50
loops. Then since there are some questions that must be answered, the
program refused to save the question and is asking the enumerator to answer
50 loops. When I ask the enumerator to modify the how many people live in
the hh"?, the program do not correct and leave the 50 sub-questionnaires
there.

I am sure you must have had similar problem before. How have you dealt with
it?

Thanks

1 Like

Hi Adrien,

This is a common issue. To be conservative, ODK doesn't delete
already-created instances when somebody revises the count downward. After
all, that would risk throwing away data.

For example, say that the user at first entered 3, then entered a bunch of
info, then went back and revised the number to 2. In that case, which
instance should be thrown away? It might have been that they entered
details for three people, then determined that the second person shouldn't
have been included; in that case, it's the second instance that should be
deleted, not the third.

So, in fact, you can manually delete instances. On one of the questions in
that instance, long-press on the question label. A "delete group" option
will pop up, and you can use that to delete the instance.

Now, if you really just want to throw away the instances at the end, when
there are too many, then inside the repeat group you can put first a
calculate field named "instancenum" that calls "position(..)" in its
calculation column. Then put all of the visible questions in the repeat
inside a simple group that has something like this in the relevance column:

${instancenum} <= ${hhmembers}

Then, if there are extra instances for some reason, they will just be
completely hidden. In the data, you'll see those extra instances, but all
of the responses will be empty.

Best,

Chris

··· --- Christopher Robert Dobility, Inc. (SurveyCTO) http://www.surveycto.com/ http://blog.surveycto.com/

On Mon, Jan 18, 2016 at 3:21 AM Bouguen Adrien adbouguen@gmail.com wrote:

Dear all,

I have an issue regarding my ODK questionnaire. I am running a household
survey: on ODK I have included a "begin repeat" function to repeat the same
questions for each hh member. I have also included a repeat_count column so
that I first ask " how many people live in the hh"? and then the program
automatically create as many loop as hh members.

My problem is : if an enumerator makes a mistake in the question " how
many people live in the hh"? and insert 50 instead of 5, the program
creates 50 loops. Then since there are some questions that must be
answered, the program refused to save the question and is asking the
enumerator to answer 50 loops. When I ask the enumerator to modify the how
many people live in the hh"?, the program do not correct and leave the 50
sub-questionnaires there.

I am sure you must have had similar problem before. How have you dealt
with it?

Thanks

--

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/d/optout.

1 Like