Creating Tree Grid Views
Copy
The Tree Grids are defined by the Tree Grid View Items that are found as Contents --> Administration --> Configuration --> Tree Grid Views.
Each Tree Grid View Item is associated with a Query Definition, which is based on a Context Item Type. Once selected, you can build a grid for data display. The following are the basic steps for creating a Tree Grid View:
- Build a Query Definition.
- Create a Tree Grid View for viewing the data.
- Map the data from the Query Definition to the grid.
The following sections describe how to build a Tree Grid View for the Part ItemType.
Before creating the Tree Grid View, you must first create the Query Definition. For information on how to create a Query Definition, refer to the Query Builder Guide. Specifically, Section 2 walks you through creating a sample Query Definition. This Tree Grid View Administrator Guide takes that sample Query Definition and uses it in the following procedure to build a sample Tree Grid View.
Once the Query Definition is ready, build the Tree Grid View using the following procedure:
- Create a new Tree Grid View item and specify a unique Name and select an existing Query Definition to be used.
- Select the Auto Grow on Refresh checkbox to keep the Tree Grid View expanded to the maximum number of grow levels when you do a refresh.
- After saving the item, click the Show Editor button on the left sidebar to go into Grid-Editing mode.
- Right-click on each element that should display data in the grid and select Map element.
- Right-click the column header and click Add New Column.
- Right-click the new column, click Change ColumnLabel, and then call it Name.
- Add two more columns named State and Created On.
- Save the Tree Grid View.
The next step is to map the data from the query into the table created in the previous sections. This is done by defining the data that should go into each cell and how the data should be handled by the UI. The UI supports 8 types of data.
The UI-upported data types
| Data Type | Description |
| Text | Displays value as plain text |
| Decimal | Parses the decimal number to display decimal delimiter as either “.” or “,” |
| Date | Parses the data to display as a date. Supports short/long/date/time |
| Color | Displays color |
| Item | Displays a hyperlink to the specified Item |
| List | Displays List property value |
| Float | Displays Floating Point Property value |
| Boolean | Displays Boolean property value |
| Integer | Displays an Integer Property value |
Use the following procedure to fill in the sample grid with data:
- Double-click in the Part-Name cell and specify the following:
- Cell View Type:
Text - Text Template:
{Part.name} - Double-click the CADName and DocumentName cells and specify the name properties for both.
- Double-click the Part Created ByName cell and set the Text Template as
{Part CreatedBy.first_name}{Part Created By.last_name}. - Map the State properties for Part, CAD, Document, and Simple MCO to the appropriate cells.
- Double-click on the Simple MCOCreated On cell and set the following properties:
- Cell View Type =
Date - Text Template =
{Simple MCO.created_on} - Double-click the top PartPart TGV cell and set the following properties:
- Cell View Type:
Item - Innovator ItemType Name:
Part - Id Template:
{CAD.id} - Text Template:
{CAD.item_number} - Repeat these steps to create the same link for CADPart TGV, DocumentPart TGV, and Simple MCOPart TGV cells.
- Repeat the previous steps to create the same link for Part Created ByPart TGV cell, but for text display select the
login_nameproperty. - Double-click into the PartBOM-Part TGV cell and set the following:
{BOM.related_id/@keyed_name} - Qty: {BOM.quantity}. - Save the Tree Grid View.
Once you have saved the Tree Grid View, you can export the data to either an Excel file or a Word document by clicking on the appropriate icon in the toolbar. For more information about Cell View Types, refer to Section 4.9.