I'm running into an issue where I have a nested repeat (i.e., Repeat 2) that is set to minimal appearance yet it is creating an empty record when paging backwards through entries in Repeat 1.
I did some research and found that calculations within a nested repeat could cause this behavior, so I removed all calculations from Repeat 2, yet I am still seeing this behavior.
I'm wondering if there's something I'm missing here that would also be causing these empty records to get created when paging backwards in the repeat?
For some additional context, this is basically an inspection form, so Repeat 1 are the items being inspected while Repeat 2 are the issues found on each item. In the case of a "clean" item, no entries get made for Repeat 2 (i.e., the + button is never pressed). The user could simply delete the blank record when they are paging backwards through their data entries, but it is somewhat annoying. Not to mention we've found that when they try to call their data back from the sent box for editing, it does not allow deleting of repeats so once the blank is created they are stuck at that point in the form.
Solved! Go to Solution.
Why not have the nested repeat tied to something like a select_one yes_no, and only make it relevant on a 'yes'. Then there shouldn't be any strange behaviour with scrolling back.
I was able to recreate the issue even after stripping out nearly everything (which I had to do because my Connect kept lagging out otherwise). The select_one fixed the issue.
Why not have the nested repeat tied to something like a select_one yes_no, and only make it relevant on a 'yes'. Then there shouldn't be any strange behaviour with scrolling back.
I was able to recreate the issue even after stripping out nearly everything (which I had to do because my Connect kept lagging out otherwise). The select_one fixed the issue.
Hi @DougBrowning and @abureaux,
Thanks for the response!
Doug- I don't think what I'm seeing in my form is quite the same as what is described in the links you've provided. I'm not getting blank records in the underlying dataset. It's just creating a blank repeat in the form, and only when paging backwards. It's more like the "minimal" appearance of Repeat 2 isn't being honored when navigating backwards through Repeat 1. I wonder if this has to do with the "w#" prefix in the appearance column that I'm using for the grid layout?
Abureaux- I can confirm making the nested repeat conditional based on a select_one yes_no in the parent repeat does solve this issue. It's not the solution I would have preferred, but does get the job done. I think I had tried making the calculations in the nested repeat conditional, without success, but hadn't thought to just make the entire repeat conditional.
Thank you for your help!
Is your survey configured with pages when initially published?
I'm finding that if I publish a new survey for the first time without pages in Survey123 Connect, then add them in once published, my nested repeat does not create an "empty" record. But, if the survey is first published with pages, I get blank records added in my repeats.
You can try copying your survey and doing a "new" publish without the pages, then add the groups/pages back in.
That's an interesting observation. While I don't have many instances of that happening, it does happen from time to time that I add the 'pages' appearance to a survey after it's published. I'll have to keep an eye out for any differences on those surveys.
However, in my testing with this particular case, I published a fresh survey and saw the described behaviour immediately. So, I am thinking this issue and yours are most likely separate.