# Determine If Tree Selection is a Folder

**URL:** <https://forum.inductiveautomation.com/t/determine-if-tree-selection-is-a-folder/45779>\
**Category:** Ignition\
**Created:** [April 19, 2021, 8:56pm UTC](https://forum.inductiveautomation.com/t/determine-if-tree-selection-is-a-folder/45779 "2021-04-19T20:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alainia.spencer](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@alainia.spencer](https://forum.inductiveautomation.com/u/alainia.spencer)\
**Post date:** [April 19, 2021, 8:56pm UTC](https://forum.inductiveautomation.com/t/determine-if-tree-selection-is-a-folder/45779/1 "2021-04-19T20:56:14Z")

</div>

How would I figure out through script if a folder is selected on tag tree in perspective? I know how to do this in Vision but I am having a hard time figuring it out using the perspective tree.

For an example, in the screen shot below, how do I determine that the TEST PAD or ALL folder is selected. I need to be able to determine if a folder is selected or an actual item under the folder.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3e1775f5064521d045035da86b2aef4eb1abf8e.png)
