Hello,
I have a form that enters turning points into a repeat, and then uses sum(repeat) function (eg sum($geopoint}) to calculate the polygon in a geoshape question outside of the repeat (see attached xlsform screenahot).
It works fine in the field app and connect but when I try to test the form in the Survey123 web app, the sum(repeat) to calculate the polygon does not work.
Is this calculation not supported in the web app? If so does anyone know of a work-around?
Thanks!
Solved! Go to Solution.
If it is a list of points then I would think join() would be what you want and not sum. I think it is deflating to string and that is why it worked in the app - sum on a string makes a list of numbers but sum is mean for adding them up. But in web it is probably adding the numbers up and then not working. Add a note with the same calc so you can see what is going on.
Hopefully that is it
https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm
Thank you @DougBrowning !
I couldn't use join to calculate the geoshape directly but instead used it to concatenate the point coordinates into a coordinate string that i could use to create the polygon (see attached screenshot), which works amazingly.
If anyone else is trying to do the same:
I use this calculation in a hidden text field - join('; ', ${polygon_point})
and then referred to that text field in the geoshape calculation
If it is a list of points then I would think join() would be what you want and not sum. I think it is deflating to string and that is why it worked in the app - sum on a string makes a list of numbers but sum is mean for adding them up. But in web it is probably adding the numbers up and then not working. Add a note with the same calc so you can see what is going on.
Hopefully that is it
https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm
Thank you @DougBrowning !
I couldn't use join to calculate the geoshape directly but instead used it to concatenate the point coordinates into a coordinate string that i could use to create the polygon (see attached screenshot), which works amazingly.
If anyone else is trying to do the same:
I use this calculation in a hidden text field - join('; ', ${polygon_point})
and then referred to that text field in the geoshape calculation
Thanks, that helped loads as I was getting the same problem using sum().
Josh