Table Views
CV Pro
This guide is only applicable to enterprise clients using CV Pro or CV9.
Managing Table Views
Table views can be managed using the Shared List Manager in CVPro or CV9. Any shared list that corresponds to a table view will have Category = TABLEVIEW. The Shared List Manager can be filtered to only show table views by hovering over the "Category" column header, clicking the filter icon, and then clicking the checkbox next to TABLEVIEW.
To add a table view, click "New shared list" and enter the relevant info in the new row that gets added, be sure to set the Category to TABLEVIEW. To edit an existing table view, simply make the necessary changes to the corresponding record directly in the grid. When adding/editing shared lists, no changes are saved until the OK button is clicked - closing the Shared List Manager without clicking OK can result in any changes made being lost. To delete a table view, select it in the grid and click "Delete shared list."
Attention
There is no confirmation prompt so be careful. Deleting a shared list cannot be undone.
Table View Subscribers
In order for users to be able to access a table view in CVO, they must be subscribed to it in CVPro. The subscribers for a table view can be managed by selecting the table view in the "Manage Shared Lists" window and looking at the List Subscribers section at the bottom. Users can be subscribed to or unsubscribed from a table view using the "Add User" and "Remove User" buttons respectively. If the table view should be available to all users, this can be achieved by clicking "Add for ALL Users". If the List Subscribers section is empty for a given table view, no users will be able to access that table view in CVO.
Table View Description
The Description column in the Shared List Manager can be used to give additional context about the information displayed in a table view. For table views in notebook dashboards, the description will always appear below the table view. For table views in standard dashboards, descriptions will only appear below table views if the TABLEVIEW_SHOW_DESC CVO setting is set to Y.
Table View Summary Row
The summary row can be configured using the Format String column in the Shared List Manager. If configured, a summary row will appear at the bottom of a table view, before the description, and provide calculations for the specified columns. To configure a summary row for a table view, the Format String column should contain a comma separated list of configs in the format of COLUMN=OPERATOR, where COLUMN is the column to perform the calculation on and OPERATR is the calculation type. The supported operators are SUM, AVG, and COUNT. Both the column and operator are case-insensitive.
The screenshot below shows a sample table view with Format String set to SESSIONALTCD=COUNT,EventMax=SUM,TotalRegs=SUM,Paid=SUM,UnPaid=SUM,Cancelled=SUM.
Special Columns
When creating a table view, it's common to want to define columns that have a special behavior associated with them, i.e. rendering a hyperlink or formatted text. There are three reference tables that are part of this process: Table View Actions, Table View Special Columns, and Table View Value Mappings. Below are the different type of special columns available.
Hyperlinks
The first step is to create an action in the "Table View Actions" reference table that defines the desired behavior for the special column. Here are some sample hyperlink actions:
The Action column contains a unique type code to identify each action. The Handler column specifies the behavior that should be associated with an action. In the case of a hyperlink, the Handler should be the CVO function to call when the link is clicked. The Arguments column indicates what value(s) should be passed into the Handler function. The Display String column can be used to override the value returned by the query to show a different value to the user. The following string replacements are supported:
{v}
- The value returned by the query.
{v#}
- The value returned by the query will be split at any occurrences of | and then number after the v will correspond to the index of each split value. So if the query returned "123|Test", {v0} would correspond to "123" and {v1} would correspond to "Test".
If either column is left blank, the value returned by the query will be passed into the Handler function and/or displayed.
Formatted Text
The "Table View Actions" reference table can also be used to create actions that define text formatting for a special column, i.e. bold text or text with a different font color. Here is a sample action for formatted text:
Similarly to a hyperlink action, the Action column contains a unique type code to identify the action and the Handler column specifies the behavior that should be associated with the action, in this case it's set to span to indicate that this action is for a formatted span of text. The Arguments column is used to define the specific text formatting via CSS styles. In the sample action, the font-weight property is used to make the text bold. However, various other CSS properties are supported including color, font-style, and text-decoration. Multiple CSS styles can be used in a single action, style rules should be separated by semicolons. The Display String column can optionally be used to override the value returned by the query to show a different value to the user, the same string replacements and fallbacks that are supported by hyperlink actions are supported by formatted text actions.
Value Mapping
Sometimes, in order to generate the desired table view, it can be useful to have more granular control over the behavior of a column based on the values returned by the query. Go to the "Table View Value Mappings" reference table. In order to set up value mappings for an action, the action must first be defined in the "Table View Actions" reference table with Handler = VALMAP.
Here are some sample value mappings:
In this case, the action is defined so that if the value is Inprogress it will be displayed as green and bold and if the value is Investigate it will be displayed as blue and bold, any other values won't have special text formatting applied.
In this case, the action is a hyperlink that will open a document. If the value contains the string "|DL", the link text will be "Download". Otherwise, the link text will be "View Document," since that is defined as the default Display String.
Linking Actions to a Column
Actions can be linked to columns using the "Table View Special Columns" reference table. Here are some examples:
The first column is used to define which field name an action should be applied to. Column names are case- and space-insensitive. So, for example, an action defined with Column = absnum would be applied to absnum, ABSNUM, abs num, Abs Num, Absnum, etc. This will help limit the number of columns that need to be manually defined. The Action column should contain an action type that matches one of the actions defined in the Table View Actions reference table.
Checkboxes
Checkboxes can be rendered in a table view by returning <check-y>
for a checked checkbox or <check-n>
for an unchecked checkbox.
Stoplights
Stoplights, which are colored circle indicators, can be rendered in a table view using one of the following tags, each tag corresponds to the color of the stoplight:
-
<red>
-
<yellow>
-
<green>
-
<blue>
-
<purple>
-
<orange>
-
<gray>
The tag can also be followed by a string to show after the stoplight, i.e. <red>-$100
or <yellow>$1000
, but the tag must be at the start of the data string in order for the stoplight to work.
Progress Bars
Progress bars can be rendered in a table view using the <progbar>
tag. The fully syntax for the <progbar>
tag is <progbar_number_color>
. The number should be the total percent out of 100 (i.e. 25 for 25%). The color is optional and will control the fill color of the progress bar (the default is blue). It can be any HTML color name (see the list here) or a hexadecimal color code/RGB color value (an HTML color picker can be found here). Some sample valid <progbar>
tags are <progbar_25_red>
, <progbar_50_#FFFF00>
, and <progbar_75_rgb(0, 128, 0)>
. The <progbar>
tag must be at the start of the data string in order for the progress bar to work. More info on progress bars in table views can be found here.