AnsweredAssumed Answered

Problem with calculation field and repeating fields

Question asked by rila on Jan 18, 2018
Latest reply on Jan 18, 2018 by rila

I have a been trying to figure out a way to do this calculation but it's hurting my brain because it doesn't calculate the way I expect it to.


I have a repeating field calculation with 6 repetitions.

I am referencing 3 other global repeating fields in the calculation.


The following calculation doesn't work properly.  It only calculates the first repetition.


static::baseprice[Get(CalculationRepetitionNumber)] + colours*static::adcol[Get(CalculationRepetitionNumber)]


If I add a [1] to colours like this:


static::baseprice[Get(CalculationRepetitionNumber)] + colours[1]*static::adcol[Get(CalculationRepetitionNumber)]


it works properly.  Strange because colours is not a repeating field...


When I try to add another repeating field reference to the equation, I cannot get it to work.  I feel there is some sort of bug with the Get(CalculationRepetitionNumber) inside the repeating field brackets. It will only calculate the first repetition.  The rest are "?"


Here's the equation I cannot get to work:


static::baseprice[Get(CalculationRepetitionNumber)] + colours[1]*static::adcol[Get(CalculationRepetitionNumber)]

+ static::sizeprtchg[size]


which is strange because "static::sizeprtchg[size]" works fine by itself in a separate calculation field.


Am I doing something wrong or is this a bug?


Thanks for reading!