Controlling Tree Labels

Trees

Trees are a common way to explore the information in a database and controlling tree labels is important as:

• Any query’s results can be shown in Tree style
• Trees are available for each item type from the Project sidebar
• The Phase hierarchy can contain nodes that run queries whose result item are shown as nodes in the phase hierarchy tree

A default tree view can be set for individual items. This view is used to construct the text label whenever a tree node is added for an item of that type. Any frames, linked items, discussions are ignored.

As shown in the screenshot below, “REQ-1” in the DEMO project as the top level item, using the tree view you can see all items which are linked to REQ-1

Screenshot showing the Requirement hierarchy tree from a query in the DEMO project
Requirement hierarchy tree from a query

Cradle has a default for the labels of the nodes in these trees. This default uses an item’s Identity, Name, Key, Version and Draft attributes. This label may not be what you want to see, particularly if:

• Your items are auto-numbered, so the Identity is generated by Cradle and is not important to you,
• If most of this type of item do not have anything in their Name attributes

You can control the contents of labels in tree nodes. To do this:

1. Login to WorkBench as a user who can modify the schema and can create project-wide views
2. Define a new view that lists the attributes that you want to appear in the labels. This view can include any attributes except calculations and frames. Only the first row in the view will be used. Save the view with Project scope, to ensure that everyone can use it.
3. Start Project Setup from the Project tab, set Options to Item Definitions and select the Item Types tab
4. Select the item type whose tree labels are to be set and choose your view from the Tree view: drop-down list
5. Save the schema and close Project Setup

Now when any user sees any items of this type in any tree, the labels for these tree nodes will only contain the information defined by the view.

Setting up tree labels for item types can be a very efficient tool when using Cradle to help your team save time when browsing through the tree nodes for items types, as this will only show the pre determined information the user is looking for.

Article Updated  – 04/02/2019 – Added image and conclusion