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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Havoc said: Is it possible with SheetWorker to sort a fieldset? Or maybe API? Yes, you can write a comma-separated list of sectionIDs into the _reporder_repeating_foo attribute to sort the section repeating_foo (You can do this via the API too). The actual display on the sheet will not update until the sheet is reopened (but there may be a way to force a refresh).
You can also read and store all items in the repeating section, delete all items in the repeating section, sort the items, and re-add them. It would not require a refresh, but IDs would be lost.
Sorry to ask, but do you have an example code maybe? I'm not that good with javascript. What I want to achieve is that the player has a list of rolls (name, attribute, ability) and he would need to able to choose by which column he wants to sort (and the direction).