Bug with repeat aggregate function?

543
4
05-15-2018 03:24 AM
ClaireWood
New Contributor III

Hi,  I have a survey which uses repeats, and sums the total within each repeat using the aggregate function e.g. sum(${repeat_value}).  

Since upgrading to Survey123 version 2.7.98 (and Survey123 Connect 2.7.72) this no longer works - the entry box remains blank.  This worked perfectly in the previous version.

Is this a bug, or has the syntax changed somehow?

Thanks!

0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Claire,

Can you share a copy of the XLS file?  If you want to e-mial directly, please do so at jtedrick AT Esri.com

0 Kudos
ClaireWood
New Contributor III

Hi,

I’ve figured out what the problem is.  In order to use the aggregate function, sum(${repeat_value}), the values in the repeat had to be converted to integers in separate fields using ‘number(${field})’.  These new columns were hidden using a ‘relevant’ clause.  However, this no longer works as the calculation no longer was being evaluated where the column is not relevant.

I have changed these hidden fields to ‘hidden’ types, removed the ‘relevant’ clause, added ind:esriFieldType as esriFieldTypeInteger and added a column called ‘bind::type’ and set to ‘int’.   This now appears to work.

Claire

0 Kudos
DaveKerr1
New Contributor II

I have been trying to do this without luck, just came across this and will try it.

Is there any way we can get this to work with Decimals? We enter partial values, can't have them truncated.

0 Kudos
ClaireWood
New Contributor III

Hi James Tedrick

I have recently updated to Connect version 3.7.62 and am getting this same problem again and the changes I made in the previous post are no longer working. 

So to summarize, my survey uses repeats, and sums the total within each repeat using the aggregate function e.g. sum(${repeat_value}).  Each of these totals is summed in a single calculation e.g.   sum(${repeat_value1})+sum(${repeat_value2})+sum(${repeat_value3}).  This used to work, but now doesn't.

Hope you can help!

Claire  

0 Kudos