Good day,
I am trying to run a calculation with uses the calculationMode=always feature. Basically, we are collection measured tree heights and then for each tree inside the repeat, we determine whether it is inside or outside of a specified range (20% above or below the mean). The mean obviously recalculates with each entry that is added. The mean recalculates fine, but the behaviour I am seeing is that the values inside the repeat only recalculate when I read the repeat.
So basically, the out of range and within range boolean values only update if I actually go to that repeat and look at it. This would be a huge nuisance and leave a lot of room for error in the assessment. I have tried to reference the top_from_mean and lower_from_mean inside the repeat, but they also do not recalculate until you scroll back to that record in the repeat:
Here is an extract from Survey123 connect showing have the top and lower from mean values have not recalcuated:
{
"Stocking_assessment_test": {
"Plot_repeat": [
{
"plotno_calc": 1,
"plotno2": 1,
"count_trees": 3,
"count_trees_alive": 3,
"avg_height_alive": 53.33,
"survival_pits": 100,
"top_from_mean": 64,
"lower_from_mean": 42.66,
"notacceptable": 0,
"acceptable": 3,
"uniformity_calc": 100,
"trees": [
{
"treeno_calc": 1,
"treeno": 1,
"height": 54,
"alive": 1,
"out_of_range": 0,
"within_range": 1,
"top_from_mean_2": 64.8,
"lower_from_mean_2": 43.2,
"plant_status": "alive"
},
{
"treeno_calc": 1,
"treeno": 2,
"height": 63,
"alive": 1,
"out_of_range": 0,
"within_range": 1,
"top_from_mean_2": 70.2,
"lower_from_mean_2": 46.8,
"plant_status": "alive"
},
{
"treeno_calc": 1,
"treeno": 3,
"height": 43,
"alive": 1,
"out_of_range": 0,
"within_range": 1,
"top_from_mean_2": 64,
"lower_from_mean_2": 42.66,
"plant_status": "alive"
}
]
}
],
"wpu_list": "BABANANGO"
}
}