I am just learning script in Google Appsheet and have copied other scripts trying to adjust them to toggle my check boxes but haven't been able to get it working. Can someone help me get it scripted? Entire Columns J,L,N,P starting at row 5 need only one check box checked "True" per row at a time. Column J,L,N,P row 4 needs a master check box that will check or uncheck entire column.
I started with Ben's but wasn't able to get it edited. https://www.benlcollins.com/apps-script/radio-buttons-in-google-sheets/?unapproved=191483&moderation-hash=afecc2580f0b56c2ec9e26cdef4d1a99#comment-191483
Here's what I have so far but it doesn't do the entire column or all of the master check boxes.
function onEdit(e) {
const as = e.source.getActiveSheet();
const cell = e.range.getA1Notation();
const cell_checks = ['J4','L4','N4','P4'];
if(as.getName() == "MATERIAL LIST" && cell_checks.includes(cell) &&
e.range.isChecked())
{cell_checks.filter(val=>val!=cell).forEach(c=>as.getRange(c).uncheck())}
var spreadsheet = SpreadsheetApp.getActive();
if (e.range.getA1Notation() == "J3") {
spreadsheet.getRange('J4:J291').setValue('True');
}
}