Reference fields in tables or repeaters

I have already set-up a dynamic page and used fields from various different Datsets to create the information contained on the page. Now I am looking at building a single Search content page using either a table or repeaters (or both). However, the reference fields do appear for selection, but do not appear in the results.

Also, when using image in a reference field the preview mode shows the error " Wix code SDK error: The “src” property cannot be set to “”. It must be a valid URL starting with “http://”, “https://”, or “image://”.

Anybody know why?

Hello Huge,
regarding the second issue, make sure u don’t have empty fields in the URL field in your collection.
as for the fist issue, could you please explain more what’s the selection and whats the results ?

Massa

Having exact same issue…why are reference fields not able to select…that is whole point of a table originally by wix, so you can use a reference field to populate a column and other data for another column

Dear Jeff

They are!!!

After days of pulling my hair out the answer was soooooo simple. Not being a coder, everything is difficult!

Here is the start of my OnClick code for the Search Button:

export function button1_click(event, $w) {
wixData.query(‘offers’)
.include(“accommodation”, “itinerarylink”, “topSantalink”, “resort”)
.eq(“avail”, “Y”)

I simply added that line that says .include and included the names of the reference fields there. All works like a dream for me now.

Hope it works for you. :slight_smile:

Regards

Hugh