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

Repeating Rows that cannot be Deleted

1604969631
mrianmerry
Pro
Sheet Author
Is it possible to create a repeating section where the rows can have a value that prevents them from being deleted? Preferable behaviour would be outright "cannot click on the delete button when editing the repeating section", but also acceptable would be having a sheet worker that can respond to the repeating section edit action completing (by pressing done)  or on sheet open. I think I know how I would make a sheet worker that can re-populate a repeating section with the rows I don't want to be deleted when the sheet is opened, so the actual contents of the sheet worker I am comfortable with. My actual goal here is to have a set of skills in a sheet where there are some values that cannot be removed, but that could be re-ordered along with the values beneath it, so I want to avoid having a situation where there's a section of similar-looking fields with a repeating section beneath it. Thanks all for any advice offered.
1604973443
GiGs
Pro
Sheet Author
API Scripter
see here:&nbsp; <a href="https://wiki.roll20.net/Sheet_Worker_Scripts#remove:repeating_.3Cgroupname.3E" rel="nofollow">https://wiki.roll20.net/Sheet_Worker_Scripts#remove:repeating_.3Cgroupname.3E</a> You can get the values of the deleted row, and recreate them. Another approach is to use CSS to hide the delete button so players cant press it. But thats no good if you just want to stop them deleting some items from the repeating section, but want to allow them to delete others. Personally I'd avoid this complexity by having the stats that cant be removed be separate attributes before or after the repeating section. Yes, they cant be reordered, but they aren't the same type of attribute anyway so thats no problem IMO.
1604974160
mrianmerry
Pro
Sheet Author
Ahhh, I see. I’ll give that a go and see if it feels smooth enough to be acceptable. Thanks for the pointer!