cancel
Showing results for 
Search instead for 
Did you mean: 

Sum in a loop

nirupama
New Contributor II

Hi,
I have an default value for field $sum=390 and 10 input records(count may increase/decrease).
Requirement :Each row should get $sum=$sum+10. if 1st row having sum=400, 2nd sum=410…
Please suggest.

1 ACCEPTED SOLUTION

pmancevski
New Contributor III

Hi @nirupama,

You can use “Mapper” snap, with following settings:

image

Thanks,
Pero M.

View solution in original post

5 REPLIES 5

nirupama
New Contributor II

@pmancevski $group.map((value, index) => value.extend({‘sum’ : parseInt(value.sum) + ((index + 1) * 10)})) - This expression solved my query.

Thank you!