You can use a tree in your application to effectively communicate hierarchical or multiple level data.
Topics in this section include:
To create a tree:
Navigate to the Shared Components page:
Navigate to the Workspace home page.
Click the Application Builder icon.
Select an application.
On the Application Builder home page, click Shared Components.
Under Navigation, click Trees.
The Trees page appears.
Click Create.
The Create Tree Wizard appears. Note that each wizard page displays a series of blocks on the left, representing the sequence of steps. The highlighted block indicates the step you are performing.
For Page Attributes, enter basic page information and click Next.
To learn more about a specific item on a page, click the item label. A Help window appears with a description of the item or field.
For Tab, specify how tabs should be implemented and click Next.
For Tree Attributes:
Tree Name - Enter a name.
Default Expanded Levels - Specify the number of default expanded levels.
Start Tree - Specify how you want to determine the starting point. This determines what point in the hierarchy you want to display.
- Based on New Item with Popup List of Values - Select this option to set up an item containing a list of values. This option enables the user to determine the starting point to display by selecting an option for the list of values.
- Based on a SQL Query - Select this option to write a query that dynamically finds the starting point of a hierarchy (the entry with no parent).
- Static Value - Select this option to hard code the starting point.
Click Next.
For Tree Template, select a template and click Next.
For Tree Start, specify a starting point and click Next. Depending on your Start Tree selection, enter either a query or a single value.
For Expand/Collapse, select the buttons to include and click Next.
For Table/View Owner, specify the owner of the table on which the tree will be based and click Next.
For Table/View Name, specify the name of the table on which the tree will be based and click Next.
A tree is based on a query and returns data that can be represented in a hierarchy. This hierarchy is determined by the relationship between ID and Parent ID values. Identify the column you want to use as the ID, the Parent ID, and specify the text that should appear on the leaf nodes.
ID - Enter the column you want to use as the ID.
Parent ID - Enter the Parent ID.
Leaf Node Text - Specify the text that should appear on the leaf nodes.
Link Option - Select Existing Application Item to make the leaf node text a link. If you select this option, specify a page to link to.
Identify an optional where and order by clause to add to your query.
Specify the display text for the Go button.
Identify the page you want to branch to when the user clicks a button.
Click Finish.
Once you create a tree, you can edit it on the Trees page.
To edit a tree:
On the Workspace home page, click the Application Builder icon.
Select an application.
On the Application home page, click Shared Components.
Under Navigation, select Trees.
The Trees page appears.
You can change the appearance of the page by making a selection from the View list:
Icons (the default) displays each tree as a large icon.
Details displays each tree as a line in a report.
Select a tree.
The Edit Tree page appears.
Edit the appropriate attributes.
To learn more about a specific item on a page, click the item label.
When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".
Click Apply Changes.
The Edit Tree page is divided into the following sections: Name, Query, Before and After, Static Node Templates, Dynamic Templates, Node Text Templates, and Link Templates.
You can access these sections by scrolling down the page, or by clicking a navigation button at the top of the page. When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.
You can view the Trees Utilization and Tree History reports by clicking the appropriate tab at the top of the Trees page.
Note:
The Utilization and History buttons only appear after you have created a tree.Click Utilization on the Trees page to access the Tree Utilization report. This report displays all trees included in the current application. To edit a tree, select the tree name.
Click History on the Trees page to view changes to trees by developer and date.