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

Referencing a repeating section within another repeating section

1483538758

Edited 1483543530
Kryx
Pro
Sheet Author
API Scripter
I have a repeating section named "repeating_trait". I'd like to show a checkbox for each trait inside another repeating section. Since it is impossible to reference a repeating section from within a different repeating section I thought I'd generate the names to blank fields. For example "trait_0" is set to "Eldritch Invocations". I then try to reference "trait_0" within my other repeating section "repeating_attack" via the following: <span name="attr_trait_0"></span> "trait_0" is successfully set and I can see it in the Attributes & Abilities tab. If I reference "trait_0" as above outside of the repeating section it works, but accessing it within "repeating_attack" doesn't seem to work as the span is blank even after closing and opening the sheet. Any ideas?
1483545800
Lithl
Pro
Sheet Author
API Scripter
Have you tried using sheet workers to synchronize the values appropriately?
1483547039

Edited 1483547412
Kryx
Pro
Sheet Author
API Scripter
Brian said: Have you tried using sheet workers to synchronize the values appropriately Synchonize to each repeating section? A user could have 30 traits. I'm not looking to create 30x fields for every attack, spell, etc where I plan to implement this feature. The issue is how roll20 references fields. Whenever a field is referenced from within a repeating section it's reference is localized. For example "trait_0" becomes "repeating_action_ID_trait_0". I'm looking for a way to avoid this and reference the values from outside the repeating section.