Hi all,
I’m new to coding, but have got some bits together and i’m currently building a search page to find records. I have a dropdown option that works great, but I want 2 fields that allow a minimum and Maximum search on a number. I’ve tried many things, but as soon as I add the code for min and max, it fails. Can anybody tell me what i’m missing?
function SearchCaravan() {
wixData.query(“Caravan”)
.contains(“site”, $w(“#LUSite”).value)
.eq(“active”, true )
.eq(“approved”, true )
.eq(“forSale”, true )
.ge(“caravanBerth”, $w(“#MinBerth”).value)
.le(“caravanBerth”, $w(“#MaxBerth”).value)
.find() // Run the query
.then(res => {
$w(“#CaravanSale”).data = res.items;
});
}