Unique fields Concatenating in Repeater

Hi I have added the following code which works but does show all the fields to be the same, is it possible to ensure that the fields are still unique by tweaking this code

$w.onReady(() => {
$w(“#dataset1”).onReady(() => {
$w(“#repeater1”).onItemReady( ($item, itemData, index) => {
const item = $w(“#dataset1”).getCurrentItem();
const event = item.event;
const photo = item.photo;
$w(‘#text66’).text = ${event} is **for** ${photo} ;
})
})
})

Thanks
Adam

Hi Adam,

Can you describe the end-goal for what you are trying to accomplish with this code?

Thank you,
Nick

You need to use the Repeated Item Scope . That is, use $item for the components in the Repeater item:

$w.onReady(() => {
   $w("#dataset1").onReady(() => {
      $w("#repeater1").onItemReady(($item, itemData, index) => {
         const event = itemData.event;
         const photo = itemData.photo;
         $item('#text66').text = `${event} is for ${photo} `;
      })
   })
})

Note that by using itemData, which is the Repeater Item’s current item, there is no need to call getCurrentItem().

Thanks Yisrael