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

Help Reordering Repeating Rows with _reporder Attribute?

I am attempting to sort a fieldset of date entries in chronological order.  I thought it was as simple as... var arrayOfRowIDs = [ "-lbieztbzqghvtdv2sq0" , "-lbif-k1rwwe37pijys4" , "-lbif0lvvpepradj5aqw" , "-lbif0tsuimwqjtmhegw" , "-lcejrpnlgk2scmk2xqs" , "-ljftk4si3v4rj1wkzdg" ] // ... sort the Row IDs ... setAttrs ({ _reporder_repeating_timeline: arrayOfRowIDs . join ( "," )}) ... but doing this doesn't change the positioning of the rows.  Have I missed something, or am I going about this the wrong way? I have confirmed via console logging that the script is working as intended in terms of retrieving, sorting and then joining the rowIDs into a comma-delimited list; in the end, the _reporder attribute it being set to the following string: "-lbif0lvvpepradj5aqw,-ljftk4si3v4rj1wkzdg,-lbif0tsuimwqjtmhegw,-lcejrpnlgk2scmk2xqs,-lbif-k1rwwe37pijys4,-lbieztbzqghvtdv2sq0" Thanks in advance for any help you can provide!
1562588382
The Aaron
Roll20 Production Team
API Scripter
Attributes that start with _ are read only and cannot be changed. The API cannot change the order of Repeating Attributes. The closest it can do is remove and recreate them in the desired order, which could cause problems for players if they have any buttons on their macro bar from the rows in question. 
Ah, okay, thanks!  Don't know where I got it in my head that this was possible :)  Fortunately, the timeline is a read-only thing on the sheet, so recreating the attributes shouldn't be a problem.