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

Dynamically Populate Dropdown List?

Is there a way to dynamically populate a dropdown list via parsing a repeating section? For example, I would like players to access a dropdown box in which lists all of their weapons, of which each is a repeating section member. If so, how do I do this?
1499388378
Lithl
Pro
Sheet Author
API Scripter
No, that's not possible.
Ah, alright then. Thanks for the quick reply!
1499423310
Ziechael
Forum Champion
Sheet Author
API Scripter
Are you trying to do this with a macro query or as part of a character sheet's code? With a macro you would do it based on the repeating sections row id: ?{What weapon|repeating_weapons_$0_weaponname|repeating_weapons_$1_weaponname|repeating_weapons_$2_weaponname} etc... You can then do some pretty funky stuff with it depending on how much you crave the insanity of nested queries...
1499461549
Lithl
Pro
Sheet Author
API Scripter
Building off Ziechael's suggestion, a sheet worker script could populate some attribute with the necessary roll query, and that attribute could be fed into a roll button/macro. It wouldn't be a dropdown on the sheet, but it would be a dropdown. And that way, you could even get the actual name field as the text to display in the dropdown.