2025-07-11 19:40:54 +03:00

4.6 KiB
Vendored

Table View

The table view displays information in a grid, where the rows are individual notes and the columns are Promoted Attributes. In addition, values are editable.

Interaction

Creating a new table

Right click the Note Tree and select Insert child note and look for the Table item.

Adding columns

Each column is a promoted attribute that is defined on the Collection note. Ideally, the promoted attributes need to be inheritable in order to show up in the child notes.

To create a new column, simply press Add new column at the bottom of the table.

There are also a few predefined columns:

  • The current item number, identified by the # symbol. This simply counts the note and is affected by sorting.
  • Note ID, representing the unique ID used internally by Trilium
  • The title of the note.

Adding new rows

Each row is actually a note that is a child of the Collection note.

To create a new note, press Add new row at the bottom of the table. By default it will try to edit the title of the newly created note.

Alternatively, the note can be created from theNote Tree or scripting.

Editing data

Simply click on a cell within a row to change its value. The change will not only reflect in the table, but also as an attribute of the corresponding note.

  • The editing will respect the type of the promoted attribute, by presenting a normal text box, a number selector or a date selector for example.
  • It also possible to change the title of a note.
  • Editing relations is also possible, by using the note autocomplete.

Working with the data

Sorting

It is possible to sort the data by the values of a column:

  • To do so, simply click on a column.
  • To switch between ascending or descending sort, simply click again on the same column. The arrow next to the column will indicate the direction of the sort.

Reordering and hiding columns

  • Columns can be reordered by dragging the header of the columns.
  • Columns can be hidden or shown by right clicking on a column and clicking the item corresponding to the column.

Reordering rows

Notes can be dragged around to change their order. This will also change the order of the note in the Note Tree.

Currently, it's possible to reorder notes even if sorting is used, but the result might be inconsistent.

Limitations

The table functionality is still in its early stages, as such it faces quite a few important limitations:

  1. As mentioned previously, the columns of the table are defined as Promoted Attributes.
    1. But only the promoted attributes that are defined at the level of the Collection note are actually taken into consideration.
    2. There are plans to recursively look for columns across the sub-hierarchy.
  2. Hierarchy is not yet supported, so the table will only show the items that are direct children of the Collection note.
  3. Multiple labels and relations are not supported. If a Promoted Attributes is defined with a Multi value specificity, they will be ignored.

The table view can be used in a Saved Search by adding the #viewType=table attribute.

Unlike when used in a Collection, saved searches are not limited to the sub-hierarchy of a note and allows for advanced queries thanks to the power of the Search.

However, there are also some limitations:

  • It's not possible to reorder notes.
  • It's not possible to add a new row.

Columns are supported, by being defined as Promoted Attributes to the Saved Search note.

Editing is also supported.