I am running into an issue using calculated fields inside a repeat. The user enters a number into Field 1. Field 2 sums the total values entered in all Field 1's within the repeat. Field 3 divides Field 2 into Field 1 to get a percent coverage across all records.
begin repeat
Field 1: ${enterAnumber}
hidden Field 2: sum(${enterAnumber})
hidden Field 3: ${enterAnumber} div sum(${enterAnumber})
end repeat
Field 4 (outside the repeat) - how many records are greater than 20% of the total?
This works well for any given record in the repeat, but it only takes into account the sum of values already entered. If a new record is added then Field 3 in the previous records do not update, which means my Field 4 calculation is incorrect. Is there a way to force the calculations within a repeat to rerun? If not, any other thoughts on how to approach this?