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

[Sheet Workers] How to add up entries from repeating fields

I know there is an inventory sheet worker out there, but I am having a real hard time understanding it.  So, can some one give me a stupidly easy way to add up all of a single 'column' in a repeating field?  Say, all of the attr_sue attributes in the  repeating_jim field...
1464897579

Edited 1464897607
Finderski
Plus
Sheet Author
Compendium Curator
Use  TheAaronSheet.js It does more than I'm using it for, but...if you put that at the top if your Sheet work, then to do inventory you just call TAS.repeatingSimpleSum with the necessary fields. My inventory calc looks like this: // Calculate Gear Weights on('change:repeating_gear remove:repeating_gear',function(){ TAS.repeatingSimpleSum('gear','itemWeight','geartotalweightcarried'); }); For more information you can look at his readme file located  here , but the specifics of calling function are: TAS.repeatingSimpleSum( RepeatingName, ValueField, SumAttribute )
...and that worked.  It took a while, with me bashing my head against the wall, but I found my tiny errors, and everything works. Thank you very much, GV, for getting me to try theAaron's stuff one more time.  And thank you, TheAaron, for putting this...(stares blankly at the wall of code)...uh... this together.
1464924116
Lithl
Pro
Sheet Author
API Scripter
Coal Powered Puppet said: And thank you, TheAaron, for putting this...(stares blankly at the wall of code)...uh... this together. TAS isn't hugely complicated ... but it is huge  =P
Brian said: TAS isn't hugely complicated ... but it is huge  =P ...Yes.