Need to implement Intervals

Situation:
I developed a tool which consists of two parts as follows:

  1. Group 1: Common set of questions that will be asked from all interviewees.

  2. Group 2: Set of questions that will be only asked to selective people. Most likely I am aiming to get this set of questions answered by every 5th interviewee.
    [In other words, I was 5th, 10th, 15th,20th, so on person should be asked Group 2 questions.]

ATTEMPTS:
I tried the random number generation logic in this. Though it does provide a randomness to the tool however it does not give the consistency that I am looking for (I want every 5th individual to be asked Group 2 questions.). I am unable to think of other ways.

QUESTION:

→ How can I implement my logic of sample interview from every 5th interviewee without any flow control issues ?

Note: The mode of interview is offline.

Just saw another question come up on the ODK forum this morning, with a helpful resource shared that allows an incremental counter in your form, and then you could base the relevancy/skip logic on the incremental count…

Here’s the link to the topic - look at the XLSForm shared by @grzesiek2010 on that topic called Autoincrement.xlsx

Autoincrement.xlsx (4.9 KB)

KoboToolbox was updated last year to allow to use the #last-saved functionality - so this should work for you…but test it out and come back to us to see if this creates the behaviour you’re looking for! (or if you need further support!)

Hope this is helpful!
Janna

2 Likes

Last saved function was working as needed however there is one big issue. If we fill a form and save it and due to some error we want to edit previously saved form then the because of the last saved logic the form’s ID increments to the next available number from its old number.

For eg: If I edit form with ID 5 after completing 7 respondent interviews, the ID of 5 with change into 8 and save as new.

QUESTION:
How can I ensure that irrespective to how many times we edit, the ID stays the same ?