Dynamic table

Note

Here you'll learn how to work with the new Wiki editor. For information on how to create and edit tables, see Dynamic tables (old editor).

Dynamic tables are tables where you can specify column data type, sort values, or make cells required for filling in. You can create a new table on your page or embed an existing one.

Embedded tables can be edited right on Wiki pages, unless you selected Read-only when copying the table code. All changes are automatically applied to the main table and any of its occurrences on other pages.

A single table can have no more than 1000 rows and 300 columns.

Creating a dynamic table

  1. Open a page or create a new one.

  2. In the visual editor, click Dynamic table on the toolbar.

    This will add the table to the page. If you switch to markup mode, you'll see the table code in the text.

    The created table becomes a resource of the current page.

  3. To edit the table header, click it and enter a new title.

  4. Add columns to the table and configure their parameters.

  5. Fill out the table.

Copying a dynamic table

To create a copy of a dynamic table:

  1. Click Table settings and select Create copy.
  2. Enter a name for the table copy.
  3. The URL for the copied table is generated automatically. You can edit it if you want.
  4. Select the cluster where you want to place the table copy.
  5. To copy the table along with its contents, select Copy with content.
  6. Click Copy.

Warning

If you select and copy a table in the visual editor or its embed code in Markup mode, you'll only copy a link to the original table with its ID. In this case, all changes to the embedded table automatically will apply to the source table and vice versa.

Importing data to a table

You can create a table from an existing CSV or TXT file. For more information, see Importing a page from a file.

Editing a table

Editing cell contents

  • Click in the selected cell and enter a value. The row height depends on the content of the cell where the largest value is written.
  • Use the Markdown markup to format text.
  • To switch to a new row in a cell, press the Shift + Enter hotkey.
  • To open an input field in a separate window, click .
  • To save the changes, exit the cell editing window. This saves the changes automatically.

Setting up table columns

To add a column:

  1. In the top right corner, click .

  2. Specify the column parameters:

    • Enter the column header in the top field.

    • The Unique ID field will be filled in automatically. You can edit it manually, if required.

    • Select a type of data to display in the column from the drop-down list. After you save the settings, you will not be able to edit the data type.

      Available data types
      • Formatted text. Any text formatted by Markdown.

      • Number.

      • Checkbox. Field with a checkbox. To mark an entire row, enable the Mark as done option. In this case, the checked rows will appear gray.

      • Date.

      • List. Field to select one value from a list of suggested options.

        To select a multiple-choice list, enable the Allow multiple options option.

      • Employee. Employee's first and last name.

        To select multiple employees, enable the Allow multiple users option.

      • Issue in Tracker. The key of the issue that will function as a link in Tracker.

      • Issue parameters. Parameters displayed for the Tracker issue data type.

    • In the Width field, set the column width or leave the default Auto value.

    • To enter a column description, click Add description. To view the column description, hover over the icon. Its text will appear in the pop-up window.

    • To turn cells into required, enable the Required option.

    • For columns with the Checkbox data type, enable the Mark as done option. In this case, the checked rows will appear gray.

  3. Click Add to save your changes.

  4. To change the column parameters, click in the first cell of the column and select Settings.

  5. To change the column width, move the side border to the left or right. The change in width will be immediately displayed to all users who are currently viewing the table.

Changing the column order

  1. In the top right corner, click .

  2. Select Configure columns in the table settings.

  3. Select the column name in the list, click , and drag it. You cannot select multiple columns to move.

Deleting a column

  1. Click in a column's first cell.

  2. Click Delete.

Adding and deleting rows

  • To create a new row, click Add row at the bottom of the table.

  • To delete a row, hover over it and click Delete row.

Importing data to a table

You can add data from a CSV or TXT file to a table: For more information, see Adding data to a dynamic table.

Highlighting in color

  1. Click in the column header or next to the right edge of the row.

  2. In the menu, hover over Choose color and click the preferred sample.

Renaming a table

To rename a table, click the table name and enter a new one.

Restricting editing for a table

You can apply the readonly parameter to prevent users from editing the table. In markup mode, add the readonly parameter to the code and specify a value of 1.

{% wgrid id="88812dba-0e72-48bf-bd68-1b2e1534b5e0" readonly="1" %}

To remove this restriction, specify 0.

Showing row numbers

You can use the num parameter to display the row numbers of the table. In markup mode, add the num parameter to the code and specify a value of 1.

{% wgrid id="88812dba-0e72-48bf-bd68-1b2e1534b5e0" num="1" %}

To hide row numbers, specify 0.

Embedding an existing table

You can embed a dynamic table in an existing page. In this case, all changes to the embedded table automatically will apply to the source table and vice versa.

  1. Open the page with the table.

  2. In the top right corner, click Table settings.

  3. Select </> Copy embed code.

  4. Configure the parameters for embedding the table.

  5. Copy the table code and paste it into the page text.

Restricting editing of the source table

If you add a dynamic table by linking from another page, users without access to that source page won't be able to view the table. Learn more about access settings.

To restrict editing of a source dynamic table:

  1. Open the page where the table is added as a resource.
  2. In the top right corner, click  Actions Settings Access rights and select Only its authors can edit the page.
  3. When embedding a dynamic table on other pages, enable Read-only.

Note

If you have access to the page where the dynamic table is added as a resource, you can open the source page to edit the embedded table.

Table embed parameters

You can set parameters for a table during the embedding process or change its code in markup mode.

Sample table code:

{% wgrid id="67b29081-ab1e-4ec7-a5b8-8511025f250a" num="0" sort="0" readonly="1" %}
Parameter code Description
Id Required parameter. Present by default. ID of the table that you want to add to the page.
readonly If specified, the table is embedded in read-only mode.
num If specified, the table's row numbers are displayed. Enabled by default.
sort If specified, the sorting settings of the source table are ignored. Enabled by default.
filters Use it to set filters for displaying table rows.
columns Use it to set columns to display on the page.

Note

The num and sort parameters are enabled by default and aren't shown in the code when the table is copied. Their default value is 1.

Jumping to the parent table

To open the original table embedded in the page:

  1. In the top right corner, click Table settings.

  2. Choose Parent table.

This opens the page where the table is listed among the page resources. To see a full list of page resources, click Actions in the top right corner and select Page resources.

Choosing columns for display

You can use the columns parameter to only display the specified columns of the dynamic table on the page. In markup mode, add the columns parameter to the code and specify the IDs of the required columns.

{% wgrid id="88812dba-0e72-48bf-bd68-1b2e1534b5e0" columns="name, description, properties" %}

To find out the column ID:

  • Click in the column header.

  • Select SettingsUnique ID.

Setting filters for displaying rows

Use the filter parameter to set which rows should be displayed in the embedded table, For example:

{% wgrid id="88812dba-0e72-48bf-bd68-1b2e1534b5e0" filter="[name]=<value_1>, [description]=<value_2>" %}

This filter will only display the rows for which the following conditions are met at the same time:

  • Column with the name ID is set to <value_1>.

  • Column with the description ID is set to <value_2>.

To find out the column ID:

  • Click in the column header.

  • Select SettingsUnique ID.

To output all rows that meet at least one of the specified conditions, use the OR operator.

Setting values to compare

Depending on the column data type, values to compare are specified in different ways:

Data type Example Description
Text 'bicycle' Text in single quotes
Number -7 Number without quotes
Checkbox true Different write formats are supported.

For logical 0: no, off, false, unchecked.

For logical 1: yes, on, true, checked, done.
Date 2012-12-12 Date in YEAR-MONTH-DAY format
List 'bicycle' Text in single quotes
Multiple-choice list 'bicycle' Text in single quotes
Employee login@ Employee's username without quotes
Issue in Tracker KEY-1234 Tracker issue key without quotes
Supported comparison operators
Operation Writes Example
Equal to =, is [vehicle] is 'bicycle'
Not equal to !=, is not [vehicle] is not 'bicycle'
Comparison <, >, <=, >= [count] > 50
Contains a substring ~ [vehicle] ~ 'bi'
Contains no substring !~ [vehicle] !~ 'bi'
In the interval from ... to ... (handles numbers and dates) between ... and ... [count] between 100 and 1000
Equal to any of ... in (...) [vehicle] in ('bicycle', 'motorcycle', 'helicopter')
Not equal to any of ... not in (...) [vehicle] not in ('submarine', 'spaceship')

Sorting table rows

When viewing a table

You can change the sorting order when viewing a table. To do this, click in the first cell of the column and select Sort in descending order or Sort in ascending order.

Note

This sorting order is available only if sorting isn't disabled by the embed parameters.

Default sorting

To set up the default sorting order:

  1. In the top right corner above the table, click Sorting. The Table settings panel appears on the right.

  2. On the Table settings panel, select SortAdd.

  3. In the drop-down list, select a column and sorting type: Sort in descending order or Sort in ascending order.

  4. Click Save. The Sorting button in the top right corner above the table will be highlighted in blue.

You can use the Add button to select multiple columns and set their sorting order. To do this, in the list of sorting conditions on the Table settings panel, click and drag . You can't drag multiple sorting conditions at the same time.

To remove all sorting conditions, on the Table settings panel, click Reset, then Save.

Downloading a table

  1. Click Table settings.

  2. Select Download Table and select the required format.

Sharing a table

  1. Click Table settings.

  2. Select Share and click Copy. The table link will be copied to your clipboard.