I have an inspection form with repeat. The repeat in the survey contains two questions. The first is about the presence of trees, and the second is about the number of trees (if the first question is Yes). In the repeat, I have a field that takes the value of the second question (if the first question is Yes), otherwise it takes the value 0. I have another field that sums up all the trees.
type | name | label | calculation | relevant | bind::esri:parameters |
begin repeat | Tree | <center>Tree | |||
select_one yes_no | Trees_Present | Present of trees : | |||
integer | Trees_Number | Trees : | ${Trees_Present} = 'yes' | ||
integer | Trees_Total | Total : | if(${Trees_Present} = "yes", ${Trees_Number}, 0) | calculationMode = always | |
end repeat | |||||
integer | All_Trees | Total trees : | sum(${Trees_Total}) | calculationMode = always |
When users were filling out the survey recently, they noticed that moving back and forth between repeats to make corrections locked the calculations and the totaled sums could no longer be updated. I have tried calculationMode = always.
I am using Survey123 version 3.22.49.
Solved! Go to Solution.
This "refresh" button indicates that either someone typed into the field, or something more annoying is going on (could be a few vague things...). Clicking the button should show the correct values.
Try some of the things I have listed above. There are probably a few things on their own that will resolve the issue. But there are several "best practices" that should not only fix that issue, but prevent future issues as well.
I don't remember repeats being locked down if it is the same session but, Take a look at this documentation about editing repeats. Also did they "tab" off the question or some other commit prior to jumping back and forth between repeats?
on the begin repeat question in the bind::esri:parameters column, put query allowUpdates=true
I set query allowUpdates=true, but I get the same problem.
The field that takes the value of the second query doesn't recalculate even if I validate the change to the second query.
Try this:
Not sure why the way you had it setup didn't work?
It makes no difference, on the Connect or on my phone.
This "refresh" button indicates that either someone typed into the field, or something more annoying is going on (could be a few vague things...). Clicking the button should show the correct values.
Try some of the things I have listed above. There are probably a few things on their own that will resolve the issue. But there are several "best practices" that should not only fix that issue, but prevent future issues as well.