Choose Video with 2 dropdowns

I have a page on which a video lesson is chosen by using to dropdown menus. The first dropdown menu filters the options by category, and the second dropdown menu presents the titles of the videos that are available based on the filter from the first menu.

I’ve got the first menu figured out. The second menu has been populated from the database. However, I can’t figure out how to get the second dropdown menu to work. Now I’m guessing I need to have an onChange function to get the correct video to load on the page. Can someone please help?

export function filterInput_change(event, $w) {
$w(“#dataset1”).setFilter(wixData.filter()
.contains(“module”, $w(“#filterInput”).value));

} 

export function dropdown1_change(event, $w) {

//Add your code for this event here:
}

Hi,
I would use the regular Array.filter function to filter the relevant records instead of using the setFilter option. It’s a similar case to this thread (the filterTable function). On this thread, she wanted to change the table rows based on the dropdown user inputs added to the page. Instead of assigning the results to the table, you can assign the result to the video element .

Good luck,
Tal.