Tables - Advanced

Sort-able, paginated and searchable tables can be shown in a modal

Screenshot

Output Parameter

You can display a sort-able, paginated, and searchable table in a modal fly-out.

Note that tables tend to be larger than the typical chat window width, so you might want to position the modal center (which is the default) and make its size medium/large/x-large.

To add a table you need to add an extensions output parameter with the following value:

The displayTable method has this format:

Utility to Create Table Headers

The headers object passed to ExtensionHelper.displayTable() contains all the information for each column's functionality. For example:

  • Header's label

  • Sortable

  • Position (left, center and right)

  • Width

ExtensionHelper has a utility function that will assist you in creating the object representing the table headers.

Full Example

Here's a script that will build a basic table. Note you can position table headers left, right or center.

Output Parameter

Now to display the table above you would add the following Output Parameter

JSON

Last updated