Dear @wroos
Thank you SO MUCH for your analysis. Very much appreciated, although I still can’t see the issue resolved.
Focusing on the “core problem” (calc in line 12), please note that I had changed that into if(${classes_pp_new}!=‘’,${classes_pp_new},${classes_pp_pull}), when experimenting. The original formula, which was/is reflecting the actual logical forward most directly, was: if(${situationdata_check_class}=‘y’,${classes_pp_pull},if(${classes_pp_check}=‘y’,${classes_pp_pull},${classes_pp_new}))
In any case, your version if(${classes_pp_check}=‘n’,${classes_pp_new},${classes_pp_pull}) doesn’t show any change (when I am testing it here: KoboToolbox
For instance, if one choses ‘n’ in the first step (are the numbers of classes for ALL grades, not just pp, still correct?) and ‘y’ also in the second step (is the number of pp classes still correct?), but then goes back and changes this to ‘n’, then…
…it seems to work, if I go back just from the next (usually invisible) question
…but it doesn’t work, if I go to the next visible question (i.e. the first enrolment date selection in line 23) and THEN go back to change the second confirmation step to ‘n’ and consequently enter a 2 then – in this case, the counter for entering the (should be 2) classnames remains on 4 (in the background), so that the form asks for 4 classnames (and later also asks for enrolment dates for 4 pp classes).
Do I miss to see the obvious? For me, going back and ensuring a ‘n’ (confirmation step 1), a ‘n’ (confirmation step 2) and 2 (classes_pp, used as the repeat counter then), should really work. There is no old wrong field values which could have an impact, are there? Is the repeat counter defined, when one “passes by” it in the first round and not fetched afresh, if one passes by it the second time, after the value of the counter has been changed??