How to retrieve data from a repeater element by clicking a button outside the repeater?

export function button1_click(event, $w) {
 const user = wixUsers.currentUser;
 const userId = user.id;
 // this is the item in the repeater assuming that the button is in the repeater.
    wixData.query("panier") // get the item from the database collection.
        .eq("title", $w("#title").text)
        .find()
        .then((results) => {
 const itemDemandededevis = results.items[0];
            itemDemandededevis.userId = userId; // adding a field of the current user to the database in order to distinguish between other users wishlist. 
            wixData.insert("Demandededevis", itemDemandededevis) // finally, insert it to the wishlish database collection.
                .then(() => {
 let insert = results.items[0]._id; // instead of results.items[0]
                    console.log('Done')
                });
        });
}

Hi this is url page
https://bookingseminaire.wixsite.com/monsite-2/panier-all
Thanks

@mickael Check out the introduction of the repeater documentation in the section entitled “Retrieve Repeater Item Data When Clicked”. That’s for a case where the element clicked on is inside the repeater item, which appears to be where the button is on your page.

Hello Anthonyb Thank you for your response but the buttons on my page are outside the repeater So how by clicking on it I can get the info from the repeater Thank you