I have "multiple reference" fields in my collection and need to show the values on the page.
How can I do that?
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
So I created my own solution.
Maybe someone next could use it too. ... and I am happy for any other creative solution. ;-)
That's mine:
// Reference-Title export async function getReferenceTitle(refID, dbName) { const db = await wixData.query(dbName); let result = []; for (const id of refID) { result.push(await getReferenceText(id, db)); } return result; } async function getReferenceText(id, db) { return (await (db.eq("_id", id).find())).items[0].title; }
Output is an Array of Title.