Table widget
This page requires:
Basic knowledge of JSON file structure.
Configure widget
A table widget can be used when arrays (lists) are stored in the case data structure and need to be presented as such in the case UI. The following fields need to be configured for a table widget.
Widget title The widget title is presented in the UI at the top-left corner of the widget and should describe the content for that widget.
Rows per page If the content exceeds the number of rows pagination will be added in the UI.
Path to table data The exact path in the JSON document that contains the array with data.
Table columns Columns need to be based on the available fields within the array data.
Configure table columns
For each column in the table the following configurations needs to be done.
Title The title will be displayed as the label of the field in the widget.
Value The value itself will not actually be configured, the path targeting the value in the JSON document is configured. The value is passed through by the widget.
Display type Select the way the data is presented in the UI. Please find the available display types below.
The same list of display types is available as for the fields widget. Please find the documentation on the different display types there.
Table widget configuration example
Below example shows the configuration for a table that displays uploaded files by there name and creation date.
The path in the JSON document for the array:
doc:/uploadedFiles
The information from the array that is shown:
Since the location of the array itself is known it is no longer need to define a full JSON path for the values of the table columns. Only define the data location within the array like so:
data/name
data/createdOn
To gather the data the widget code will combine the "Path to table data" field with the value fields from the column configuration. This results in the following JSON paths where x is filled by iterating over the array data.
doc:/uploadedFiles[x]/data/name
doc:/uploadedFiles[x]/data/createdOn
This configuration is based on below JSON. The uploadedFiles object exists in the root of this JSON document. Below the JSON a screenprint of the configuration in the Widget configuration UI.
Table widget options
Below option there is a toggle available named "First column is the title of the row". Enabling this will display the first column with italics and no underline. See below screenshots for the difference in presentation in the result of above configuration. 6 files where uploaded for this example so 3 pages of each 2 files are shown in the widget.
Last updated