# Accessing Multiple Selections in Tree View

**URL:** <https://forum.inductiveautomation.com/t/accessing-multiple-selections-in-tree-view/11700>\
**Category:** Ignition\
**Created:** [May 19, 2016, 7:09pm UTC](https://forum.inductiveautomation.com/t/accessing-multiple-selections-in-tree-view/11700 "2016-05-19T19:09:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikehill100](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mikehill100](https://forum.inductiveautomation.com/u/mikehill100)\
**Post date:** [May 19, 2016, 7:09pm UTC](https://forum.inductiveautomation.com/t/accessing-multiple-selections-in-tree-view/11700/1 "2016-05-19T19:09:48Z")

</div>

Hi Everybody!

I have a tree view with the selection mode set to Multiple-Discontiguous. This works great and allows the user to select multiple nodes on the tree.

Unfortunately, I can’t figure out how to use the multiple selections. The “Selected Item” property only gives the value of the first node selected. Where do I go to get all the nodes that are selected? I don’t care if it is through scripting, or binding, or whatever.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [May 19, 2016, 7:34pm UTC](https://forum.inductiveautomation.com/t/accessing-multiple-selections-in-tree-view/11700/2 "2016-05-19T19:34:49Z")

</div>

[code]t = event.source.parent.getComponent(‘Tree View’)

print t.getSelectedItems()  
print t.getSelectedPaths()[/code]

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [May 19, 2016, 7:37pm UTC](https://forum.inductiveautomation.com/t/accessing-multiple-selections-in-tree-view/11700/3 "2016-05-19T19:37:45Z")

</div>

[quote=“mikehill100”]Hi Everybody!  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1fdba136f4d90303bfc8d5719ac0620955db03d2.png)  
[/quote]  
😆

Have you looked at the component functions getSelectedItems() and getSelectedPaths(). I have not used them but the docs say that they return lists of selected items/path.

Edit: jpark beat me to it but at least I got to post Dr. Nick!
