I’m new to Wix & Wix Code, so the solution to this may be obvious, but I’m having problems filtering down my Wix Bookings dataset using “contains”, “endsWith” etc. If I use “eq” for my filter, it seems to work ok. (I have my dataset connected to a gallery, and to a repeater). For example, the below code works correctly (and returns me 1 match):
$w(“#dataset1”).setFilter(wixData.filter().eq(“serviceName”, “American Accents”))
.then( () => {
let count = $w(“#dataset1”).getTotalCount();
console.log("Final size of dataset = " + count);
} )
. catch ( (err) => {
console.log(“Dataset filter problem”);
});
Similarly, matching by serviceType works correctly.
$w(“#dataset1”).setFilter(wixData.filter().eq(“serviceType”, “APPOINTMENT”))
However, if I change my filter to something like the below, I consistently get 0 matches
wixData.filter().contains(“serviceName”, “American Accents”)
wixData.filter().contains(“serviceName”, “Accents”)
wixData.filter().endsWith(“serviceName”, “Accents”)
wixData.filter().contains(“serviceName”, “Acc”)
wixData.filter().contains(“serviceType”, “APPOINTMENT”)
Any ideas? Thanks!