# How do you populate a treeview in perspective, I could not find any documentation on how to do it

**URL:** <https://forum.inductiveautomation.com/t/how-do-you-populate-a-treeview-in-perspective-i-could-not-find-any-documentation-on-how-to-do-it/85947>\
**Category:** Ignition Exchange\
**Tags:** perspective\
**Created:** [February 19, 2024, 3:59pm UTC](https://forum.inductiveautomation.com/t/how-do-you-populate-a-treeview-in-perspective-i-could-not-find-any-documentation-on-how-to-do-it/85947 "2024-02-19T15:59:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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, 5:46pm UTC](https://forum.inductiveautomation.com/t/how-do-you-populate-a-treeview-in-perspective-i-could-not-find-any-documentation-on-how-to-do-it/85947/4 "2024-02-19T17:46:08Z")

</div>

You may find my post below helpful. The Tree component (not Treeview as you have in your title) is tricky because the 'items' property is recursive.

> [@Vertical menu tree in perspective](https://forum.inductiveautomation.com/t/vertical-menu-tree-in-perspective/75685/8):
>
> Here's how I did it. [Page configuration] Figure 1. Do the Page Configuration. Figure 2. Create the menu structure in text. I do this in the actual application. Note the use of the '|' pipe character to separate the menu and URL. Bind the tree's items property to the text and apply a script transform on it: 
> 
> > **The 'items' binding script transform.**
> >
> > def transform(self, value, quality, timestamp): # Update the test tree with the structure. # Anchors and path URL…

> **[Perspective - Tree | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-tree)**
>
> The Tree component displays a tree hierarchy based on an array of objects.

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-do-you-populate-a-treeview-in-perspective-i-could-not-find-any-documentation-on-how-to-do-it/85947)._
