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

Summing Entries In a Recurring Section

Can I sum entries in a recurring section?  If so how?  What I am looking at is the following: In GW one does not level, but once they get a certain amt of xp, you roll on a table to get a random bonus.  It may be you get +1 on a stat, +1 to attack; and so on. I have a recurring section where you can record the bonus via a drop down select.  Now what I need to do is iterate through the recurring "array" and sum up each type of bonus if it is selected, then put this total in the appropriate hidden fields.
1516828591
GiGs
Pro
Sheet Author
API Scripter
It is doable, most likely using the getSectionIDs function. It;s hard to suggest code without more concrete details - what your repeating section looks like, and which attributes need summong, and the name of the hidden total fields (more than one?) used, etc.
You can also add TheAaronSheet (TAS) to the sheetworker section of your custom character sheet code and use that to sum amounts in repeating sections, along with other things. See this forum thread here: <a href="https://app.roll20.net/forum/post/2876287/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2876287/slug%7D</a>