import wixData from ‘wix-data’;
$w.onReady(() => {
$w(“#dataset4”).setFilter(wixData.filter().eq(‘location’,));
});
export function location1_change(event) { let myValue = $w(‘#location1’).value;
console.log(myValue,“myvalue”)
$w(“#dataset4”).setFilter(wixData.filter()
.eq(‘location’, myValue))
.eq(‘goLive’, “GoLive”)
.eq(‘category’, “Speaker”)
}
I’m using a dropdown box to filter a repeater. I would like the user to be able to select a location and only have profiles come up the are live and in the speaker category. The code works without the bottom 2 lines but brings out profiles that re not live and in other categories. But when I add the 2 .eq lines of the code. It stops working altogether.
I’m not a coder and doing my first DIY job on this. Please help.
I’m using a repeater to show user profile. On this page I have used the repteaters filters only show Speaker Profiles and Profiles that are set to Go Live. The drop down box is use as a search function to serch for Speakers in a set location. At the moment, when a user sections a location from the dropdown box, the repeater bypasses the filters that I have set and the repeater shows the correct selcected location but also shows Profiles in different categorys other then speakers and also shows profiles that are set to Off Line.