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

directly dynamically populating a dropdown from a repeating section

Directly dynamically populating a dropdown from a repeating section on a character sheet is not supported in Roll20?
1732128953

Edited 1732128964
GiGs
Pro
Sheet Author
API Scripter
No, that kind of dynamic update isn't possible on roll20 character sheets. You can have multiple predefined lists, and define which list is visible, but the list has to e defined first. You can also use optlists, which allow a user to build their own list, but I believe those are for unputs, not selects, and only apply per character sheet.
I have written code that allows me to dynamically index my ammo. Thanks to The (other) Aaron pointing me in the right direction it works great, however I am trying to populate a dropdown from a repeating section of weapons. That way my players can choose the ammo they want to shoot on the character sheet. Any suggestions?
1732136554

Edited 1732155295
GiGs
Pro
Sheet Author
API Scripter
I just noticed we are in the scripting subforum. Are you asking for a character sheet solution (there isn't one) or a script solution (I don't know)?
1732137839

Edited 1732138660
Naw man.. I already figured it out. I have a solution. I'm just going to have the players put in the name of the ammo manually and it will subtract from the ammo  index which will automatically update the character sheet.  To answer your question, yes I am running a script to do the indexing of the ammo. Thanks anyway.
1732258221
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'll note that there is actually a solution for this in character sheets using the populateListOptions sheetworker .