# SQLTag Tree

**URL:** <https://forum.inductiveautomation.com/t/sqltag-tree/11120>\
**Category:** 3rd Party Modules\
**Created:** [January 26, 2016, 3:52pm UTC](https://forum.inductiveautomation.com/t/sqltag-tree/11120 "2016-01-26T15:52:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoit](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@benoit](https://forum.inductiveautomation.com/u/benoit)\
**Post date:** [January 26, 2016, 3:52pm UTC](https://forum.inductiveautomation.com/t/sqltag-tree/11120/1 "2016-01-26T15:52:40Z")

</div>

Is that possible form a Client/Designer to get a folder in an SQLTag tree ?  
The purpose is to browse the tree to find out what is available in the subfolders.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 27, 2016, 2:59pm UTC](https://forum.inductiveautomation.com/t/sqltag-tree/11120/2 "2016-01-27T14:59:53Z")

</div>

You might find the tag.py shared script library from [this thread](https://inductiveautomation.com/forum/viewtopic.php?f=70&t=14708) useful. The virtual nodes it provides in the tag tree have iterable .children properties.

---

<div class="post-metadata">

**Author:** ![benoit](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@benoit](https://forum.inductiveautomation.com/u/benoit)\
**Post date:** [February 24, 2016, 2:14pm UTC](https://forum.inductiveautomation.com/t/sqltag-tree/11120/3 "2016-02-24T14:14:25Z")

</div>

In fact my question was about to do from a java client module.  
But it helped me.

In my calls that extends AbstractVisionPanel I can get a TagManager :  
ClientTagManager tagManager = getAppContext().getTagManager();

I also create a root node for the “default” Tag provider.  
TagPath root = new BasicTagPath(“default”);

Once I have a parent TagPath I can navigate below to “nextNode” it using  
TagPath element = parent.getChildPath(“nextNode”);  
This does not insure "nextNode exists.

From a parent TagPath I can get the children nodes using  
List childrenTags = tagManager.browse(parent);  
Then childrenTags contains a list of the tags below parent, but they are Tags and not TagPath.  
So to get a TagPath form a Tag tag and Parent TagPath  
TagPath child = parent.getChildPath(tag.getName());

With all of this it is possible to get through at Tag Tree from a Java client module.
