# How to get object reference from a clickable list button in List View?

**URL:** <https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 12, 2025, 2:22am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885 "2025-05-12T02:22:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheTallJS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thetalljs/32/1062447_2.png) [@TheTallJS](https://forums.unrealengine.com/u/TheTallJS)\
**Post date:** [May 12, 2025, 2:22am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/1 "2025-05-12T02:22:25Z")

</div>

Hi, thanks for your time and efforts.  
I followed [this](https://forums.unrealengine.com/t/quick-start-guide-to-list-view-widget/738161) tutorial and built a clickable list in blueprint. I have it so it’s a list widget within another UI widget. I’m trying to associate characters to each button so that when the button is clicked, the camera pans over to that character. I’m having difficulty finding a way to store/retrieve an object reference associated with the buttons, and therefore unable to “point” to the character that I need to obtain the location of. Where and how would a reference to a character be stored? In the ListEntry?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 3:04am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/2 "2025-05-12T03:04:19Z")

</div>

you can store data in the class you’re using for the item.  
if that’s not possible, you can try to reference them by index instead.  
i would usually refer them by index anyway.

---

<div class="post-metadata">

**Author:** ![TheTallJS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thetalljs/32/1062447_2.png) [@TheTallJS](https://forums.unrealengine.com/u/TheTallJS)\
**Post date:** [May 12, 2025, 4:49am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/3 "2025-05-12T04:49:03Z")

</div>

Thanks for the reply. I haven’t tried to store the object reference in the list widget yet, as I’m not certain how I should go about doing it. I have arrays in the player controller, but then get the dependency cycle error.

 ![11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/4/7f4620b104a1fbf75284003bc3eba56af61008e8.png)

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 5:16am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/4 "2025-05-12T05:16:26Z")

</div>

that code does not make a lot of sense to be honest.  
i was suggesting to store the index in whatever item is stored in the view.  
so that when the “OnClicked” Event is triggered, you can access that value directly.  
as an example, i have a button with an id field, that i use for this purpose.

> **[JUtils/Source/JUtils/UI/JButton.h at 16f0a44b03c036ee1de8fb9d29be4177d6c60a42](https://codeberg.org/jerobarraco/JUtils/src/commit/16f0a44b03c036ee1de8fb9d29be4177d6c60a42/Source/JUtils/UI/JButton.h#L37)**
>
> JUtils - Plugin for Unreal Engine 5 that has lots of utilities

when i create the button i set the id to whatever value it needs to be.

---

<div class="post-metadata">

**Author:** ![TheTallJS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thetalljs/32/1062447_2.png) [@TheTallJS](https://forums.unrealengine.com/u/TheTallJS)\
**Post date:** [May 12, 2025, 6:02am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/5 "2025-05-12T06:02:57Z")

</div>

Yes, I’d like to store the index in the button. Question then is how would I do that with blueprints and the list I have already set up. I forget if there’s a way to send the object reference to the button.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 7:40am UTC](https://forums.unrealengine.com/t/how-to-get-object-reference-from-a-clickable-list-button-in-list-view/2504885/6 "2025-05-12T07:40:35Z")

</div>

make your own class of a button, or the item in the list.  
make sure to choose the right parent.  
then add a variable for the index in such class.
