having an issue where i am filtering on a reference field, which is supplied by my drop down menu does not work. I can filter on any other field in my dataset but not on the reference field, which is the only one i need to work. Does anyone have a solution to this? i cant be the only one who is needing a filter using a reference field.
the code, which works fine when filtering on the title but not reference is as follows:
function db (){ //var model = $w("#ModelDropDown"); $w("#dataset1").setFilter(wixData.filter() .eq("modelSuited", $w("#ModelDropDown").value)) //reference field to filter on and filter value supplied .then( (results) => { console.log("Dataset is now filtered"); let items = results.items; console.log(results); // This is now the filtered items $w("#productTable").rows = items; } ) .catch( (err) => { console.log(err); } ); $w("#productTable").show(); $w("#enqButton").show(); }
it also seems that when the page is run, by debugging, the items variable is null, so it seems that the data is not coming in and stored in results.items as it should and what other tutorials show.
I'm having similar problem, have you found a solution??
ah, thanks for the help wix