Tree view table fields
Structure of tree view table fields
A tree view table field can obtain data from only one form, either local or remote. Each level of a tree view table represents a field from the source form (or a column in a list view table). Each node represents one or more requests from that form. Ideally, each leaf node should contain data from a field in one request. For example, the tree view table in the following figure has these levels:
Level | Source field | Nodes | Requests per node |
---|---|---|---|
1 | Type | Problem, Defect | Multiple |
2 | Severity | Critical, Severe, Moderate | Multiple |
3 | Priority | Urgent, High, Medium, Low | Multiple |
4 | Description | Customer Downtime, Incorrect Setup, and so on | One |
Example of tree levels, nodes, and leafs
You use the Sort/Levels property of the tree view table field to specify which fields from the source form appear as levels in the tree view (see Setting-sort-order-and-visible-levels). You cannot use the following fields as tree levels:
- Attachment fields, diary fields, or character fields with a data length of more than 255 bytes.
- Display-only fields
Tree levels are also fields, and you can specify their properties.
For more information, see Creating-table-fields.
Avoiding data inconsistencies in tree view tables
You can create problems in tree views if you mismatch the data used for ordering and the data used for display. In the preceding example, the following Type Sort and Type values are always paired:
Type Sort | Type |
---|---|
1 | Problem |
2 | Defect |
Suppose that a request is submitted with Type Sort = 1 and Type = Defect:
This error creates two branches in the tree for the Defect type:
To avoid similar problems, design your data model carefully.
Selecting requests in tree view tables versus list view tables
The following figure compares a list view and a tree view derived from the same source form. The list view columns display the source field names, and its rows display the field data. In the tree view, the field data is all that appears.
List view versus tree view
When users click a row in a list view, they select only one request. To select multiple requests, they must click multiple rows while pressing the Shift or Ctrl key.
In a tree view, a node can represent one or more requests. For example, if a user selects D in the previous example, all the requests under D (x and y ) are selected. If more than one request is selected, the first request (in this example, x ) is considered the primary request, and the other requests are secondary. Workflow uses the primary request for all field value references except those in table loop guides. In table loop guides, all the requests (primary and secondary) are processed in turn. Be aware of this functionality when creating workflow for tree views (see Workflow-considerations-for-table-fields).
Tree view refresh by using a Change Field action
Unlike list view table fields, tree view table fields do not include operations such as Refresh or Select All.
To display data in a tree view table field when a user opens a form in a mode other than Modify, create a Change Field action that refreshes the field when the form is loaded. See Defining-Change-Field-active-link-actions. For information about refreshing tree view table data in Modify mode, see Refresh on Entry Change.
NULL values in tree view table fields
NULL values are displayed in tree view table fields as follows:
- When users select a parent node and any of its child nodes have data, all child nodes (including NULL nodes) are displayed.
- If all child nodes are NULL, the first child node appears, but the rest of the nodes are collapsed.
- If a parent has only one child and that child is NULL, the child is not displayed.
NULL data is represented with the words No Value in brackets ([No Value]) unless you specify a different string for the tree view table field's Display NULL Value As property.