Then perhaps this one… (not tested)
function search() {
let filter = wixData.filter();
if ($w("#checkbox1").checked===true) {filter = filter.eq("boolean1", true);}
else if ($w("#checkbox1").checked===true) {filter = filter.eq("boolean2", true);}
else {}
$w('#dataset1').setFilter(filter)
})
I think this will also not work.
I do not know if this issue can be solved by using a filter.
If you want to collect all the boolean-values with the value=“true” then you can make a if-query which will put all the “true”-valued inputs into an ARRAY —> [ ]
if ($w("#checkbox1").checked===true) {
let newValue = .... define the new founded value here ....
myArray = myArray.push(newValue)}
At the end you should then have something like...
myArray -----> [boolean1a, boolean1b, boolean4a, boolean7b]
The array collects all the TRUE-checked values from database