AnsweredAssumed Answered

sum() Aggregate function, appends values, doesnt add them

Question asked by dbecker88 on Oct 13, 2017
Latest reply on Sep 3, 2019 by adailey_slo

Here's the general layout of the form. If selField = a, I want to set calcField to 1 for the repeat record.

Then, the calculation in sumVal field should tally all the repeat records that have a value of 'a'.


Well, the first sumVal is 1 if 'a' is selected, then you add a repeat select 'a' again, now the sumVal is 11.

So, the sum() calculation is concatenating the 1's and not adding them. How do you get around this??

I have calcField and sumVal fields set to ESRI type Integer.


begin repeatrelatedTableList of Repeats
select_one choiceListselField
calculatecalcField if(selected(${selField},'a',1,0)
end repeat