Checkbox to filter collection to a table...

Hi,
I am working with a collection that contains some boolean values, 4-5 fields that are either checked or unchecked. I wish to use checkboxes to allow a user to filter these fields and produce a results table.
I have managed to do a version of this using a drop down box for string values in my collection (it uses the .contains line in the wixData.query), but the similar syntax does not appear to work with boolean values. Unsure what to search on or for, is it Null, True, False, etc etc.

Any help would be much appreciated…

Ah - Some searching has given me the start of the answer. I can now select a checkbox and have the table update on the page. Any idea how I can combine muliptle checkboxes to give a combined result. Thanks.

Hey!

Just to be sure, you’re probably using EQ filter condition (https://www.wix.com/code/reference/wix-data.WixDataQuery.html#eq).

If you want to combine several filters with AND operator, you can just keep adding them as in this top example: WixDataQuery - Velo API Reference - Wix.com.

If you want to use OR operator, you should use this method: https://www.wix.com/code/reference/wix-data.WixDataQuery.html#or.

One more small note about Booleans. When the field is added in Collection, all items don’t get “False” by default, they are empty at that moment. So in that case, if you want to check whether cell is not true, it’s better to do that with NOT operator (https://www.wix.com/code/reference/wix-data.WixDataQuery.html#not).

Hope that helps!

Thank you so much for that response. Helpful on all levels!