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 .
×

Repeating Sum not working

I cannot get the result of a repeatingSum to show. Don't know exactly where the problem resides. I've added the following sheet worker: on('change:repeating_perk remove:repeating_perk', function() { repeatingSum("perk_total","perk","perk_cost"); }); I have a repeating list <fieldset class="repeating_perk"> with <input type="number" name="attr_perk_cost" value="0" /> Here's the line of HTML where I want to display the summed result of all perk costs. <h2>Perks Spent: <span class="input-field-medium"style="width:80%;" name="attr_perk_total"></span></h2> What am I missing?
1642540242

Edited 1642541517
vÍnce
Pro
Sheet Author
You might need to add a hidden input for the total.  Not sure if sheetworkers will update a named span alone... ie (used outside within repeating_perk) <input type="hidden" name="attr_perk_total" value="0" >
Thanks, but that didn't seem to help. I suspect its something with the sheet worker. I add this line to check the math of the work, just to see if its calculating, but not displaying. The roll shows 0 for perk total so it doesn't seem to calculate. <label>Perk check: <button type="roll" value="/roll 1d10 + @{perk_total} Roll for Perk"> </button> </label>
1642541387
vÍnce
Pro
Sheet Author
I've used repeatingSum in my sheetworkers and your code "looks" fine...  Actually, my hidden input shouldn't be within the repeating section.  Try moving it outside the fieldset.
I tried moving it to a totally different grid in the character sheet. I still get "0" displayed.
Problem found!&nbsp; I thought repeatingSum was built-in functionality. Once I added the "code" from&nbsp; <a href="https://wiki.roll20.net/RepeatingSum" rel="nofollow">https://wiki.roll20.net/RepeatingSum</a> &nbsp;it worked!&nbsp; Sorry to have missed that. But posting it here in case anyone else has the problem.&nbsp; Thanks&nbsp; vÍnce &nbsp;for your quick responses!
1642542547
vÍnce
Pro
Sheet Author
Lol.&nbsp; Been down that road more than once. ;-)