# Restrict Perspective Tree to single selection only

**URL:** <https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 18, 2024, 7:56pm UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480 "2024-10-18T19:56:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [October 18, 2024, 7:56pm UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480/1 "2024-10-18T19:56:52Z")

</div>

I want to do basically the opposite of the OP in [this post](https://forum.inductiveautomation.com/t/multiple-selections-with-perspective-tree/23690) - only allow one Tree item to be selected at a time. It doesn't seem there is a built-in way to do this - what I tried to do was to convert the `selection` property from an array to a string, but I got errors on the Tree component. Is there a native way to do this, and if not, what is the hacky way to do this?

The use case I'm using the Tree for absolutely requires single-selection only.

\*Unrelated: The Tree component's `selectionData` functionality is incomplete, in my opinion. If the Tree's `selection` property changes from `''` to `0/0`, for example, `selectionData` updates, but if it goes from `0/0` to `''`, then `selectionData` keeps the previous value that was in there. So, every time I use a Tree, I need to add a change script on `selection` ... why?

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [October 18, 2024, 8:46pm UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480/2 "2024-10-18T20:46:47Z")

</div>

Yeah, I think you're right. I haven't messed with a tree view in a while but it doesn't appear to have a way to disable that functionality.

The treeview is a little awkward to work with no doubt. I only use it if I need to 🙂

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [October 18, 2024, 9:31pm UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480/3 "2024-10-18T21:31:29Z")

</div>

Its the only / best in-built way to display Tree data structures, but there are some things about it that make me want to pull my hair out (and I'm bald).

EDIT: @bmusson has a new charting module with a `tree` type that I want to test and potentially replace some of my use cases with a better component, one that is better / faster supported. It seems like some of the Perspective components that get shipped with 8.1 are never project-tested, meaning they can work with the properties they ship with, but if they're used in a real project, there are severe limitations. I am in the process of compiling a list, but it seems like any time I bring up nice-to-haves / "simple" feature requests, those get superseded by the 8.3 releases, so I don't really bother at this point.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [October 21, 2024, 11:58am UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480/4 "2024-10-21T11:58:14Z")

</div>

Yeah, I think the community can fill in the gaps left by the initial systems. I love the open platform design. It really opens doors.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [October 21, 2024, 12:00pm UTC](https://forum.inductiveautomation.com/t/restrict-perspective-tree-to-single-selection-only/97480/5 "2024-10-21T12:00:43Z")

</div>

Yeah, everything right now is on the back burner until 8.3 is released. I've noticed some things getting updates in the release notes, and I'm guessing a lot of this is backported from 8.3, but once 8.3.0 is out, I have a feeling we'll see even 8.1 get some backports of some fixes, etc while any new "bugs" in 8.3 are worked out.
