How to get the selectedItem when button is clicked

how to get selecteditemin retool mobile when a button is clicked inside a collection. I want to save the selected row in a variable because i want to reference it in another screen.

the issue is when i click on a button inside my custom collection it acts independently but i want when i click the button the row is selected

Assuming you have a list collection, see screenshot below: