# Menu tree ItemOnClick access item property

**URL:** <https://forum.inductiveautomation.com/t/menu-tree-itemonclick-access-item-property/85916>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 19, 2024, 8:35am UTC](https://forum.inductiveautomation.com/t/menu-tree-itemonclick-access-item-property/85916 "2024-02-19T08:35:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiri\_Pise](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jiri\_Pise](https://forum.inductiveautomation.com/u/Jiri_Pise)\
**Post date:** [February 19, 2024, 8:35am UTC](https://forum.inductiveautomation.com/t/menu-tree-itemonclick-access-item-property/85916/1 "2024-02-19T08:35:32Z")

</div>

Hello,

I'm using menu tree component for navigation. There is a onItemClicked event but there is no reference to the clicked item. I want to read my custom property on the item.

There is only a list of indexes (event.path) but I'm not sure how to use that to get the Items property. Can someone explain it to me?

Thank you for help.

---

<div class="post-metadata">

**Author:** ![Jiri\_Pise](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jiri\_Pise](https://forum.inductiveautomation.com/u/Jiri_Pise)\
**Post date:** [February 19, 2024, 9:00am UTC](https://forum.inductiveautomation.com/t/menu-tree-itemonclick-access-item-property/85916/3 "2024-02-19T09:00:45Z")

</div>

The cutom prop is on the actuall item not on the view.

I have solved it like this:

```auto
def runAction(self, event):
	item = self.props
	for i in event.path:
		item = item.items[i]
	
	system.perspective.print(item["customProp"])
	

```

Is there other (cleaner) way? Or it has to be done like this?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 19, 2024, 9:15am UTC](https://forum.inductiveautomation.com/t/menu-tree-itemonclick-access-item-property/85916/4 "2024-02-19T09:15:08Z")

</div>

Sorry, I think you're going to have to show where on the component this customProp is. Post the JSON for the Menu Tree component and format it using the \</\> button.
