Sum() in repeats working well in Survey123 connect and app but not in the web app

279
1
12-17-2020 02:31 PM
HarmondSantos1
New Contributor III

Hi, I'm trying to tally the number of the risk and opportunities being selected within a repeat and assign the number to that record as an ID. For example, if the first entry is a risk - it is then ID'd as Risk 1. Second entry is opportunity, Opportunity 1. Third entry is another risk, Risk 2. Here's the calculation I have within the repeat.

It's working well on the Survey123 connect and app. But when it is opened in the Survey123 web app, the tally and calculation doesn't work? Am I missing anything here?

Attached is the xls form. Thank you!

 

0 Kudos
1 Reply
Philip-Wilson
Esri Notable Contributor

Hi @HarmondSantos1,

The sum() and count() expressions are designed to be used outside of the repeat block when they are being used to sum and count values from questions within the repeats. If they are used within the same repeat block, this may not work as expected in the web app, as it will only have access to the values in that record. In the field app it may work as expected by chance, but this is still not the correct way to sum and count these values.

Try moving those questions outside the repeat, and I think you will see it works as expected.

Regards,

Phil.