Deleting a repeat

What is the problem? Please be detailed.
Hi all,

I'm relatively new to ODK, but I've developed a short test form of a household roster. I've developed a dynamic repeat (see attached example) and have a few questions about it test_hh_roster.xlsx (24.4 KB).

  1. In this example: It asks how many bednets are in a household, then for each bednet I would like to ask a series of questions. However, if the interviewer makes a mistake in determining the number of bednets, can they go back and change the number of bednets (repeats) to be entered.This would be in circumstances such as: decreasing the number of bednets from 3 to 2 or increasing from 3 to 5?

  2. I've used "position(..)" to calculate the relative position of the repeat, is this correct? others have used "indexed-repeat(${some_var} position(..))"

What is the difference ? and is one more preferable to use?

What ODK tool and version are you using? And on what device and operating system version?
ODk Collect v1.10.2

What steps can we take to reproduce the problem?
Provide advice on the above two questions

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Hi,

I am also interested in this, and what are some good practices while using repeat groups that others can share.

1.- Personally, I have an "Acknowledge" type question before any the repeat group that I have; that way the interviewer has to confirm/double check the number of questions to be repeated. As far as I have tried, once the "repeat/loop" starts, going back and changing the number (in your example, bednets) won't reset the number of repeats generated.

2.- I use position(..) like this configuration:

+--------------+-----------+-------------------+---------------------------------------+--------------+--------------+
|     type     |   name    |       label       |                 hint                  | calculation  | repeat_count |
+--------------+-----------+-------------------+---------------------------------------+--------------+--------------+
| integer      | number    | Number of repeats |                                       |              |              |
| acknowledge  | ack       | Confirm ${number} |                                       |              |              |
| begin_repeat | repeat    |                   |                                       |              | ${number}    |
| calculate    | position  |                   |                                       | position(..) |              |
| text         | question1 | Question Number 1 | Repeat #${position} out of #${number} |              |              |
| integer      | question2 | Question Number 2 | Repeat #${position} out of #${number} |              |              |
| end_repeat   |           |                   |                                       |              |              |
+--------------+-----------+-------------------+---------------------------------------+--------------+--------------+

Hope it helps