Hi all,
I have a database with shops in different cities and the products they offered.
I created a drop down to select city, and a repeater to show results.
So I have the following code
import wixData from ‘wix-data’;
$w.onReady(function () {
$w(“#dropdown1”).onChange(() => {
$w(“#dataset1”).setFilter(wixData.filter()
.eq(“city”, $w(“#dropdown1”).value));
});
});
In my database I have a column named “Workshops” and if the specific shop offers workshops the value in the field is “Workshop”
I want to created another page with a repeater, who will show only the shops offering workshops. So ideally I will have again only the dropdown menu with cities, and I need the repeater to show only those shops that offer workshop.
I was thinking of adding somewhere an if statement (if value in column “workshops” is “workshop” then show this entry to the repeater).
I do not want to create another database, as there are too many shops and it is getting to complicating.
Is there any way to do that or shall I go for another database?
Thank you!!!