How can I prevent users from deleting all repeat instances in an Enketo grid form?

1. What is the issue? Please be detailed.
One of the user has reported an issue that on download submissions, there is a response with the ID uuid:xyz which is present in the main response sheet, but the corresponding information is not available in the sheet containing the response for grouped questions.

2. What steps can we take to reproduce this issue?
We analyzed and found that there is an option (Minus sign(-) in repeat) available in the survey form to delete the group of responses.
if user delete all repeated group responses using minus(-) sign displayed on the right of the repeat group questions and submit the survey then submitted survey information will be available in main response sheet only.

3. What have you tried to fix the issue?
We are looking a way by which deletion of at least single repeated group questions can be restricted. Kindly suggest.

4. Upload any forms or screenshots you can share publicly below.

Hi @LN , @yanokwa,
Can you please help on this.
Thanks!

You could ask a question to determine how many repeats there should be, and then use the answer in a repeat_count column for the repeat group. Then there should be no option to delete a group. If you want at least 1 group then on the first question make sure to use a constraint of .>0

For example: repeat_count.xlsx (9.0 KB)

1 Like

Thank you so much @danbjoseph for your reply!
Repeats count are not fixed. Users dynamically add repeat group questions according to their need. In this case, is there any alternate to fix it.

Another idea would be:

  • Introduce a note after the repeat with a message like "You must specify at least one DMC member"
  • Make it relevant if count(${members}) < 1
  • Make it required (yes in required column)

This technique is documented here in a tip but maybe should get its own section.

1 Like