Calculation not working as expected on Repeat

2035
16
09-13-2018 09:04 PM
AlexGodfrey1
New Contributor III

Hi Guys, 

Hoping you can shed some light

I have a survey with a repeat, and the calculations don't seem to work automatically unless I have a default populated. In this case '0'

Problem is, that I can't put a default on the repeat? or can i? 

Kind Regards,
Alexcalcs not working automatically.

Tags (1)
0 Kudos
16 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Alex,

Is this a first-level or second-level (nested) repeat?  There is a specific issue we are looking to address on nested repeats, otherwise default values should work within the repeat.

0 Kudos
AlexGodfrey1
New Contributor III

Hi James, 

Thanks for the reply. 

This is on a first-level repeat.

Cheers,
Alex

0 Kudos
AlexGodfrey1
New Contributor III

Hi James,

Thought I’d Attach Survey to make it easier ☺

Cheers,

Alex

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Thanks Alex,

One thing to note is the order of the questions/calculations - there's an implicit top to bottom order of calculation; I see that line 27 depends on line 33 having a value - this might be causing some of the behavior issues.

0 Kudos
AlexGodfrey1
New Contributor III

Hi James,

I made the changes as suggested, it was actually an error so well spotted! ☺

Still no dice however, repeat is not calculating.

Kind Regards,

Alex

0 Kudos
AlexGodfrey1
New Contributor III

HI James, 

We just tested the Survey on v2.7 and the issue is gone, however we get another issue pop up which was solved in a later release.. looks like a bug. 

Cheers

Alex

0 Kudos
AlexGodfrey1
New Contributor III

Hi James, 

Did you have a chance to have another look at this?? 

Seems to be a bug. 

Cheers,

Alex

0 Kudos
by Anonymous User
Not applicable

Hi Alex,

I had a look at your survey and tested with latest beta build available on EAC, which include some enhancements to repeats and calculations, it appears with latest builds your survey and calculations in repeats are working correctly. In doing so however I noticed that the calculations inside the repeat reference the other questions inside the repeat that are being set to a default of 0. The calculations will not work on load if it is trying to multiple by 0. Once a new value is entered the calculations work so you need to update the calculation to take this into consideration, or it can only be updated once the values are not 0.

On top of that, we do have a known bug for repeat count and default values not populating on 2nd repeat rows or above. The 1st repeat records works as expected, but not the others. I have added your comments and survey example to this issue for further testing.

Can you test your survey with the latest beta builds available on EAC and let me know if you are still having issues with calculations and defaults.

Phil.

0 Kudos
WayneDodgens1
New Contributor II

Phil, 

Was this bug relating to default values in repeats addressed in the latest release (3.2)?  I'm having some issues with calculations in a repeat (web form only) that seems to be a bug.  

Thanks,

Wayne

0 Kudos