You can now add multiple items to Reference Field Type

@adas-bradauskas Hi Adas, I’ve tried both the include() method and the query referenced method to no avail… Can you please help me? I’m really struggling here.

This is what I have currently that isn’t working:

import wixData from ‘wix-data’;

$w.onReady( function () {
$w(“#searchedrep”).onItemReady(($item, itemData, index) => {
$item(“event”).text = itemData.relatedjob;
$item(“#description”).html = itemData.jobdescription.substring(0, 225) + ‘…’;
$item(“#thumbnail”).src = itemData.thumbnail;
$item(“#thumbnail”).link = itemData[‘link-EventPhotos-relatedjob’];
$w(“#thumbnail”).clickAction = “link”;
})
});

export function searchbutton_click_1(event) {
wixData.query(“EventPhotos”)
.include(“categories”)
.contains(“relatedjob”, $w(“#searchbox”).value)
.or(wixData.query(“EventPhotos”)
.contains(“jobdescription”, $w(“#searchbox”).value))
.or(wixData.query(“EventPhotos”)
.contains(“categories”, $w(“#searchbox”).value))
.or(wixData.query(“EventPhotos”)
.contains(“tags”, $w(“#searchbox”).value))

    .find() 
    .then((results) => { 
        $w("#searchedrep").data = results.items; 
        $w("#searchedrep").expand(); 
    }); 

}