My dynamic page has 2 datasets connected to it, “Wineries” and “Wines”. The “Wineries” collection has a Multi-Reference field named “wines” and I tried to get it using to getCurrentItem() as follows:
$w.onReady(function () {
$w('#winesDataset').onReady(() => {
console.log("wines data ready");
$w('#wineriesDataset').onReady(() => {
let wines = $w('#wineriesDataset').getCurrentItem().wines;
console.log(wines);
})
})
});
And this is what I got from console:
wines data ready
undefined
Also Iv’e tried to switch between the onReady functions, and also to omit the one of the wines dataset, but all results were the same. How can I get the data from this field?