I'd like to count the number of 0 values produced in a repeat. I can't seem to do this with the count() function as it only counts total values, and can't be used to differentiate between values.
Depends what you mean by "0"...
But, something like this could work:
if the number is a zero, the counter is "1". Otherwise, it's "0". Then, you just sum up the counter outside of the repeat and you will get the number of times the value was "0"
Unless one of the limitations on using javascript in Survey123 gets in your way like not being able to do it on public facing surveys I'd do it that way. Passing repeats into a javascript function is well documented and really easy to work with, I find it way cleaner than trying to do it in the XLSform.
https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/ba-p/898782
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.