Hello folks!
I have a problem in applying a filter to a list in wix code.
I want to sort for only getting the plants flowering in june, for instance. When I activate the function tho, it will show me no plant at all (also hiding those flowering in june).
Can someone help me out?
My code below:
import wixData from ‘wix-data’;
$w.onReady(function () {
//TODO: write your page related code here…
});
//…filter to June
export function junebox_onclick() {
console.log(“filtering items to June”);
$w("#dataset1").setFilter( wixData.filter().contains("Flowering period", "Jun") )
.catch((error) => {
let errorMsg = error.message;
let code = error.code;
} );
}