Ok, sorry. Then try this one, this should do it…
let checkedBoxes = []
let checkBoxAmount = 1 //here you can set the amount/number of accessible CheckBox-Values
$w.onReady(function() {
$w('Checkbox').onChange((event) => {console.log(event.target.id)
const index = checkedBoxes.indexOf(event.target.id);
if (index === -1) {console.log("Item not existing yet")
if(checkedBoxes.length<checkBoxAmount) {
checkedBoxes.push(event.target.id)
}
else{$w('#'+event.target.id).checked = false;}
}
else{console.log("Item already existing")
checkedBoxes.splice(index, 1)
}
});
});