Select to view content in your preferred language

Using sum(repeat) to calculate geoshape from turning points in web browser

484
3
Jump to solution
11-27-2023 12:02 AM
EleanorCervigni
New Contributor II

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!

 

EleanorCervigni_0-1701072057942.png

 

0 Kudos
2 Solutions

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

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 

View solution in original post

0 Kudos
EleanorCervigni
New Contributor II

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

EleanorCervigni_0-1701145913417.png

 

View solution in original post

3 Replies
DougBrowning
MVP Esteemed Contributor

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 

0 Kudos
EleanorCervigni
New Contributor II

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

EleanorCervigni_0-1701145913417.png

 

JoshB123
New Contributor III

Thanks, that helped loads as I was getting the same problem using sum().

Josh

0 Kudos