# Menu Tree: How to Auto-Select & Expand Items Using a "source" Parameter?

**URL:** <https://forum.inductiveautomation.com/t/menu-tree-how-to-auto-select-expand-items-using-a-source-parameter/112477>\
**Category:** General Discussion\
**Tags:** perspective, ignition81, scripting\
**Created:** [November 27, 2025, 7:55am UTC](https://forum.inductiveautomation.com/t/menu-tree-how-to-auto-select-expand-items-using-a-source-parameter/112477 "2025-11-27T07:55:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Cose\_Peter1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cose_peter1/32/79174_2.png) [@Cose\_Peter1](https://forum.inductiveautomation.com/u/Cose_Peter1)\
**Post date:** [November 27, 2025, 9:55am UTC](https://forum.inductiveautomation.com/t/menu-tree-how-to-auto-select-expand-items-using-a-source-parameter/112477/2 "2025-11-27T09:55:52Z")

</div>

You can use this to highlight selections on the menu tree.

> [@Menu tree item highlight after selection on click](https://forum.inductiveautomation.com/t/menu-tree-item-highlight-after-selection-on-click/89866/7):
>
> Fantastic! Here is the script and style reference that works for me. The length of the menu tree can vary dynamically. If you prefer not to manually create a Map transform binding for each item, this solution could be quite helpful. play_button MenuTree\>onItemClickedplay_button stylesheet.css

If you want the menu tree to update when the view parameter changes, you need to implement the above functionality in a message handler and call the message handler on value change of the view parameter.

The message handler must be placed on the same menu tree component that you want to see the functionality on.

---

_[View the full topic](https://forum.inductiveautomation.com/t/menu-tree-how-to-auto-select-expand-items-using-a-source-parameter/112477)._
