SBM AppScript Reference → Programming SBM AppScript → Application Objects → Object Types → TreeItem
TreeItem is an object type for internal use and supports the concept of hierarchical relationships ("trees"). Nested objects, such as projects and folders, inherit from TreeItem so they can support the following methods. TreeItem objects are never merely of type TreeItem; they must be a subtype of TreeItem.
AppRecord->TreeItem
FindParent(parentId): Retrieve the parent TreeItem object, given the parent's TS_ID.
Input: parentId (Long Integer) – TS_ID of this item's parent TreeItem.
Output: N/A
Return: (TreeItem object) – TreeItem object representing the parent. If the parent is not found, returns the global constant Nothing.
GetFullName(delimiter): Returns the full path name from the root of the tree to this item. Used on subtype objects, this method may be used to generate full project names, folder names, etc.
Input: delimiter (String) – Optional, defaults to a single space if omitted. The delimiter appears between each node of the tree. For example, a delimiter of "|" on a Project TreeItem might return "Base Project|Main Project|ACME Project."
Output: N/A
Return: (String) – The full path name from the root of the tree to this TreeItem.
HasChild(childId): Find out if another TreeItem is a child of this one.
Input: childId (Long Integer) – TS_ID of the TreeItem to test for child status.
Output: N/A
Return: (Long Integer) – Non-zero if the given TreeItem is a child of this one; zero if not.
IsParent(parentId): Find out if another TreeItem is a parent of this one.
Input: parentId (Long Integer) – TS_ID of the TreeItem to test for parent status.
Output: N/A
Return: (Long Integer) – Non-zero if the given TreeItem is a parent of this one; zero if not.
SubList: (TreeList) – List of all TreeItem objects that are children of this TreeItem.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.