I am wanting to count the unique instances of a value within a repeat. Others have had the same issues resolved by explicitly casting the values as integers but this isn't resolving my issue.
Survey123 Addition Calculation Treating Numericals as Text Fields
https://community.esri.com/thread/203632-sum-aggregate-function-appends-values-doesnt-add-them
I have a calculate field based on a conditional IF statement such that if the condition is met a value is set. Outside of the repeat I have a sum of the conditional field. But instead of summing the integers, the output is a concatenation of text despite trying to cast values as integers and binding as an esriFieldTypeInteger.
if(condition),1,0)
sum(FIELD)
Attached is this example.
e.g.Instead of the value 2, I have 10100
| type | name | label | calculation | bind::esri:fieldType |
| begin repeat | Ratings | | | |
| select_one rating | Rating | Rating | | |
| calculate | Count_1_Star | | if(${Rating}=1,int(1),int(0)) | esriFieldTypeInteger |
| integer | note | Note | ${Count_1_Star} | |
| end repeat | | | | |
| | | | |
| integer | Integer_Count | Count | sum(${Count_1_Star}) | esriFieldTypeInteger |
