How to get Item from dynamic Dataset to a Lightbox field

Question:
Can anybody help with code for getItem from a dynamic Dataset?

Product:
Wix Editor

What are you trying to achieve:
I have a list of products done with CMS and its designed in repeater. If I click on button in one of the products (container), a Lihgtbox should open and in the first fiel should be already prefilled the name of the product.

What have you already tried:
I am now on point, that after click on Button, Lightbox open and in the first field ist written the name of the field (in my case Text1), but not the value from the CMS.
This I have now on my velo-page of the product-list (the first two tasks are for different buttons):

import wixLocation from'wix-location';

$w.onReady(async function () {
   $w('#ButtonRefresh').onClick(()=>{
  wixLocation.to("https://www. .....");
   
   })
})

$w("#pagination2").onChange( (event) => {
  let newValue = event.target.currentPage;  // 4
  $w("#ButtonRefresh").scrollTo();
})

import { openLightbox } from 'wix-window-frontend';

$w.onReady(() => {
  $w('#button13').onClick(async () => {
const dataToSend = {
subject: $w('#text1').text
    };
   openLightbox('Produktanfrage', dataToSend);
  });
});

And this is on my lightbox velo-page:

import { lightbox } from 'wix-window-frontend';

$w.onReady(function () {

  let receivedData = lightbox.getContext();

  $w('#input9').value = receivedData.subject.toUpperCase();

});

Have anybody an idea how to make it?
Thany you
M.

To have code run for a given item within a repeater you’ll need to use onItemReady and manually set the data in your repeater using its .data property.

How Anthony,
THX for your help! Now it run´s :slight_smile:
BR
M.