Does anyone know how to filter using a CheckboxGroup?

Is it possible to use a CheckboxGroup as a filter using the value within it? I would like to know if possible?

It is possible. It’s like filtering using other user input elements like dropdowns etc…
And the values are in array. See here:$w.CheckboxGroup.html#value

My website is a tutoring website and my tutors select their subjects via a checkbox group, their choices are then stored in a database. See the figure below to see how their data is collected.

I then have a dynamic page with a repeater that shows a preview profile for each of my tutors. I want to filter that repeater/dataset by the same input seen above. So that a client can come on and select what subjects they would like and the repeater will filter accordingly. The image below is how my database is set up.

Notice it is categorised by subject. I have tried a lot of different methods, but have run into a lot of issues when trying to compare two arrays to each other. What I have currently can be seen below, I am only trying to filter by one subject currently, but it is just filtering everything out.

import wixData from “wix-data”;
export function math_change(event){
let subject = event[“target”][“id”];
let values = event[“target”][“value”];
//let chosen = $w()
function filter(subject, values){
var qry = wixData.query(“Team”) // initialise query
.hasSome(subject, values)
. catch ((err) => {
console.log("error: " + err)

Sorry it is not formatted properly I tried to paste it into a code snippet but it put it in the above form.
Any help would be greatly appreciated :slight_smile:

Please make a new post instead of commenting on an old post.