Hi there!
In my Survey I am trying to analyze the ground cover of a few indicator plants at various points.
I am using a 'repeat' to collect the different coverage values for every point but upon calculating (using the 'sum' formular), Survey123 is concatenating the values instead of adding them.
See the attached xls. form for more details on how the repeat is structured.
Can anybody help me out on this one?
Thank you!
Solved! Go to Solution.
Hi.
Short answer: If you set the value of column bind::type in row number 17 to int, your sum function in row 21 will return a sum rather than a concatenation of strings.
Long answer: Working with calculate and hidden questions can get a bit tricky when working with functions like sum. If on top of that we add relevant statements things complicate even more. Your survey has both! So here are some tips:
With the above in mind, you can simplify your XLSForm quite a bit. I attached a new simplified version of your form. Hope it helps!
Hi.
Short answer: If you set the value of column bind::type in row number 17 to int, your sum function in row 21 will return a sum rather than a concatenation of strings.
Long answer: Working with calculate and hidden questions can get a bit tricky when working with functions like sum. If on top of that we add relevant statements things complicate even more. Your survey has both! So here are some tips:
With the above in mind, you can simplify your XLSForm quite a bit. I attached a new simplified version of your form. Hope it helps!
Thank you very much - now it works!
Thanks Ismael!! The response you provided a couple years ago is still helping folks like me today!!