How to get the selectedItem when button is clicked [reopened]

I've read this post, which is now closed, How to get the selectedItem when button is clicked.

I have the same issue when using a custom collection list. I've manually added buttons and clicking those buttons doesn't give the selectedItem properties.
Is there a way to access them in a custom list? Thanks

Hey @jason3w,

You can access to index of the pressed item with item or index with i. Here is an example app for it !

selectedItem in custom collection view (1).json (25.5 KB)