Thanks GiGs. Quick question; is there something else that needs to be included so that the repeating attribute change triggers other events? The column toggle works as expected (all showinmenu attributes/row check/un-check ), but I noticed that other sheet events that listen to change:repeating_ability:showinmenu aren't being triggered. Specifically, chat menus get recalculated when toggling the showinmenu checkbox individually, but they are not being recalculated when using the showinmenu_all_abilities. Current code (note: I updated the attribute name from show-toggle to showinmenu_all_abilities) on("change:showinmenu_all_abilities", function() {
getSectionIDs("repeating_ability", function(idArray) {
const fieldNames = idArray.map(id => `repeating_ability_${id}_showinmenu`);
getAttrs(['showinmenu_all_abilities'], function(values) {
const toggle = +values['showinmenu_all_abilities']||0;
const settings = fieldNames.reduce((obj, item) => (obj[item] = toggle, obj) ,{});
setAttrs(settings);
});
});
});