Select to view content in your preferred language

Summarizing values of a repeat does not work in the web form

779
3
Jump to solution
12-07-2021 08:07 AM
KimberlyMcCallum
Regular Contributor

Hi All, 

I have a survey where the user may enter many records in a repeat. At the very end of the survey, prior to submission, I would like to include a summary note for the user to be able to quickly review some of their data without clicking back through the repeat. Do do this, I simply added a hidden field in the repeat where I concatenated the field I want to put in the summary with a comma and space for readability (concat(${uselocation_name}, ', ')). At the end, outside of the repeat, I added a summary calculation field (sum(${locationNameCalc})), where all the values are added together. This looks fine in Connect but when I publish the survey and test it, the summary note simply shows NaN. I have set the bind::esri:fieldType to null as I don't want to save this in my feature service. 

Anyone have any insight into this? 

 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Oh to join strings you want join().  sum is just for numbers that threw me off.  (The apps let you cheat with + but not the web.)

This page is your new bible  https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

Hope that helps

View solution in original post

3 Replies
DougBrowning
MVP Esteemed Contributor

You need to also set the bind::type field to a number (int or decimal depending on data).  A calculation field does not know the type so you have to set it.

Hope that helps

0 Kudos
KimberlyMcCallum
Regular Contributor

Hi @DougBrowning ! Thank you for your speedy reply! The field that I want to include is a string and I was hoping to use the sum() function to concatenate across the repeat to create a nice text list. I tried setting the bind::type to string but that didn't work either. Any other thoughts? Thank you!

0 Kudos
DougBrowning
MVP Esteemed Contributor

Oh to join strings you want join().  sum is just for numbers that threw me off.  (The apps let you cheat with + but not the web.)

This page is your new bible  https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

Hope that helps