Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Calculating totals from repeating fields?

I've seen this done in several sheets, and I know The Aaron has a sheet/worker for it, but I don't know how to set it up or use it. Is there a layman's tutorial I could follow or could someone direct me in any other working manner to be able to do this? So close to finishing my sheet, but need maths :)
Copy and paste the theArrrron sheet into your sheet worker area.  Pick one of his examples (simple, etc) to place at the bottom and adjust it to match what you need. ...and, if you are like me, spend the next hour trying to find all the places you misspelled something, used the wrong punctuation, and wondering why you thought learning html and css was a good idea in the first place.
Sounds about right... Thanks, I looked at the examples but the "greek" is strong with this one lol.
1465920419

Edited 1465920458
[Deleted]
Sheet Author
So.... I've got this....     wornEquipmentColumns = [ "gearweigh" ],      updateRepeatingItems = function () {         TAS.repeating('gearweigh')             .attrs('total_gearweight')             .fields('gearweigh', 'qty')             .reduce(function (m, r) {                 if (r.I.qty > 0 && r.I.location == 0) {                         m.gearweigh += r.F.gearweigh * r.I.qty;                     } else {                         m.gearweigh += r.F.gearweigh;                     },                     {                 weight: 0             }, function (m, r, a) {                 a.S['total_gearweight'] = m.gearweigh;             })             .execute();     }, Not sure if I'm just doing it wrong or I filled something out wrong, but I can't make heads or tails of this and it isn't doing anything....