I ran into what appears to be a Survey123 web form issue with nested repeats and wanted to share. I haven't seen this exact issues brought forward. I think I have it solved for my purposes. I am posting to see if anyone else has ran into the issue, has any explanations or alternate solutions
My form structure is:
Main form ->Product repeat->Ingredient repeat
Inside the Ingredient repeat, I have a simple hidden calculated field based on another question in the same repeat ( if (selected(${<field}, 'A'), 'A', 'B')>. The calculation worked correctly in Survey123 Connect and the Field App, but in the web form it behaved inconsistently.
Adding a relevant clause to the calculated question seemed to solve some of the issue (string-length(${<field>})>0) as it delays the trigger until there is an answer to the previous question. However, after adding the relevant clause the first record of each subsequent repeat still displayed this issue unless I added a second ingredient and then returned to the first ingredient of the second product, it would then recalculate correctly.
Changing the calculationMode from 'auto' to 'always' appears to have fixed this for my situation. But I believe it has to do with the re-evaluate calculations upon submit, more than fixing the behavior as it replicates the go back to question one trigger, not actually solving the why it didn't trigger on the first ingredient of the 2nd product issue.
Again thought I would share and see if anyone else has thoughts.
Is your survey published using version 3.25? Version 3.25 has an update that affected calculations. See these pots:
Those appear to be different behavior than I am describing. I am not re editing an existing submission, these are all new records. The behavior appears to be be happening on whether calculation mode is set to auto or always. Always only appears to be working because of this:
What version is your form?
I publish from connect so it is the latest version. Just updated on Friday.