Issue with values in nested repeat being cleared when prior records are deleted

99
0
10-26-2021 10:14 AM
AndyMcClary
New Contributor II

I am currently running into an issue with a survey where I have a nested repeat that is only relevant sometimes based on a question in its parent record. Everything works as expected except in the scenario where the nested repeat record is not relevant on the first repeat record but a nested repeat record is created for the second record. If I then delete the first repeat record all information for the nested repeat record associated with the second record is cleared. 

To use the Nested Repeats Sample from Survey123 Connect as an example:

If I create a field called equipment_in_campsite in the campsites repeat, set it to default to "no", and then make the campsite_equipment repeat relevant only if equipment_in_campsite = "yes" I see the following behavior.

If campsite 1 has no equipment associated with it and campsite 2 does and I delete the record for campsite 1, all information that I have entered for the equipment in campsite 2 is cleared. 

This is obviously a highly artificial example but a field crew recently encountered this behavior in a form I designed and I wanted to bring it to your attention since it was definitely unexpected. I've attached a modification of the Nested repeats sample that demonstrates this behavior. 

Thanks 

0 Replies