Randomly select a branch in the questionnaire

Hello the great folks of ODK community,

I have a questionnaire which will have 10 different versions. It is
basically one questionnaire but some of the sections will be skipped in
different versions. The nature of skipping will depend on the number (any
number between 1 to 10) that is randomly generated at the very beginning of
the survey.

We can deal up to that part. But the thing where we got stuck is that we
will also have to limit the number of times any random number is generated.

For example, we would like 1 to appear exactly 20 times, 2 to appear 30
times etc. Basically, when the enumerator opens the questionnaire, s/he
will see a number between 1 and 10 automatically generated. Based on that
number a version of the questionnaire will be generated. We can implement
up to that part. But we can't figure out how to restrict those randomly
generated number to fixed number of times they will appear.

Any help will be highly appreciated.

Regards,
Rushad

Hi Rushad,

I don't think this is possible without customizing Collect because you
can't store state between form open sessions.

Yaw

ยทยทยท On Mon, Nov 14, 2016 at 12:55 Rushad Faridi wrote:

Hello the great folks of ODK community,

I have a questionnaire which will have 10 different versions. It is
basically one questionnaire but some of the sections will be skipped in
different versions. The nature of skipping will depend on the number (any
number between 1 to 10) that is randomly generated at the very beginning of
the survey.

We can deal up to that part. But the thing where we got stuck is that we
will also have to limit the number of times any random number is generated.

For example, we would like 1 to appear exactly 20 times, 2 to appear 30
times etc. Basically, when the enumerator opens the questionnaire, s/he
will see a number between 1 and 10 automatically generated. Based on that
number a version of the questionnaire will be generated. We can implement
up to that part. But we can't figure out how to restrict those randomly
generated number to fixed number of times they will appear.

Any help will be highly appreciated.

Regards,
Rushad

--

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.