Hi Or, I’ve actually tried this but with no luck… Can you tell me what I’m doing wrong? Do I need to set it up to run two queries?
export function searchbutton_click_1(event) {
wixData.query(“EventPhotos”)
.include(“categories”) <------- referenced field
.contains(“relatedjob”, $w(“#searchbox”).value)
.or(wixData.query(“EventPhotos”)
.contains(“jobdescription”, $w(“#searchbox”).value))
.or(wixData.query(“EventPhotos”)
.contains(“categories”, $w(“#searchbox”).value)) <------- me attempting to get it to query the referenced field
.find()
.then((results) => {
$w("#searchedrep").data = results.items;
$w("#searchedrep").expand();
console.log(results)
console.log(Object.values("categories"))
});
}