I have an inspection form with repeats within other repeats. The main repeat in a survey contains information about locations inspected during one day. The nested repeat records multiple sites within one location. I have a calculation that sums up numbers from a value (gallons) for each site for each location, and a main calculation that sums up all the gallons for each location.
type | name | label | calculation |
begin repeat | trip_record | Trip Record | |
integer | Trip_Number | Trip Number | |
text | Loading_Zone | Loading Zone | |
begin repeat | Treatment_sites | Treatment Sites for trip: ${Trip_Number} | |
select_one waterbodies | Rivers_filter | Waterbody Filter | |
select_one sites | site | Site Name | |
integer | Gallons | Gallons | |
end repeat | |||
integer | Total_gallons | Trip gallons | sum(${Gallons}) |
end repeat | |||
integer | all_trip_gallons | Total Gallons | sum(${Total_gallons}) |
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. You can change the value in the Gallons field for any of the nested repeats, but it no longer updated the calculations below. Is this new behavior?
I am using Survey123 version 3.19.121
Solved! Go to Solution.
Have you tried calculationMode=always?
Have you tried calculationMode=always?
This was the solution. Thanks.