GetCurrentItem() showing null but table shows data

Table connected to database: showing data correctly

I have a database of which each row leads to a dynamic page, on selecting a row I console.log the data of the row selected (see image) and it opens the dynamic page on which I retrieve data by the getCurrentItem() api but it returns null, als if the item not contains any data.
The page worked fine for weeks, this just happened yesterday.
I did not change any code, only refreshed the database. But if there would be any trouble with the database why is the data shown in the table correct?

You need to put the getCurrentItem() inside:

 $w('#dynamicDataset').onReady(() => {
//PUT IT HEAR
})

I had the same problem occur over night too. Your suggestion fixed it, thank you.

Thanks a lot! Any idea why my code always has worked before until this week? I did not make any changes and weeks ago data was get correctly.

Can you give me an example… I don’t understand where to put it…

My code is :

Let itemData = $w(‘#dynamicDataset’).getCurrentItem();

So where should I put my get Current Item ? and doesnt work since the wix update and was working perfectly before.

I have a database of which each row leads to a dynamic page, on selecting a row I console.log the data of the row selected (see image) and it opens the dynamic page on which I retrieve data by the getCurrentItem() api but it returns null mcdvoice

Oh… Thank you… I just realized that you have to do :
1- onReady for the page
2- onReady for the dataset as well (you didn’t need that before and it was working).

Thank you all :slight_smile: