so im focussing on what i know: setfilter, as query is backend stuff and it just isn’t working for me.
I’m making hidden on load user text input boxes e.g. ‘africabox’ that will insert the value from p1 and then filter the table. The onchange event handler doesn’t seem to work with text input. I assume it on wo But there are no other even handlers i can use as you need to manually click/hover over them etc. to activate that event.
The difficulty im having here is that i cant run a filter event automaically on p2 when the field is filled in from the data carried across from p1. If there was a way the get session on p1 could act as an onlclick event on p2 i could add hidden buttons e.g. ‘africabutton’ but again i don’t think that is possible.
Is there a way for the onchange event to filter the region part of my dataset?
Just wanted to say thanks for the help so far, I really appreciate it.
$w.onReady(function () {
const regionafrica = session.getItem('Africa');
$w('#africabox').value = regionafrica
})
export function africabox_change(event) {
console.log("filtering items to africa")
$w('#dataset1').setFilter(wixData.filter().contains("region", "Africa"))
.then((results) => {
console.log("Dataset is now filtered");
}).catch((err) => {
console.log(err);
});
$w("#table1").expand();
}