From 56553078ef03c7eb70ad0c6a1a85d1f78d4365df Mon Sep 17 00:00:00 2001
From: Elian Doran 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. The tabular structure is represented as such: There are also a few predefined columns: Right click the Note Tree and
select Insert child note and look for the Table item. 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: Each column is a promoted or unpromoted attribute that
+ is defined on the Collection note. To create a new column, either: 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 theTo create a new note, either: By default it will try to edit the title of the newly created note. Alternatively, the note can be created from the Note Tree or scripting. There are multiple menus: 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. It is possible to edit a column by right clicking it and selecting Edit column. This
+ will basically change the label/relation definition at the collection level. If the Name field of a column is changed, this will trigger a batch
+ operation in which the corresponding label/relation will be renamed in
+ all the children. It is possible to sort the data by the values of a column: By default, the order of the notes matches the order in the Note Tree.
+ However, it is possible to sort the data by the values of a column: 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. The table functionality is still in its early stages, as such it faces
- quite a few important limitations: Notes can be dragged around to change their order. To do so, move the
+ mouse over the three vertical dots near the number row and drag the mouse
+ to the desired position. This will also change the order of the note in the Note Tree. Reordering does have some limitations: If the child notes of the collection also have their own child notes,
+ then they will be displayed in a hierarchy. Next to the title of each element there will be a button to expand or
+ collapse. By default, all items are expanded. Since nesting is not always desirable, it is possible to limit the nesting
+ to a certain number of levels or even disable it completely. To do so,
+ either: Limitations: Multi-value 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 How it works
+
+
+
+
+ name
,
+ only one will be displayed.
+
#
symbol.
+
+
+ Interaction
Creating a new table
Adding columns
-
-
#
symbol. This simply
- counts the note and is affected by sorting.Adding new rows
+
+Context menu
+
+
+
+
+
+
+
+ Editing data
-
+
+
+ Editing columns
+Working with the data
-Sorting
-Sorting by column
+
-
Reordering and hiding columns
-
Reordering rows
-Limitations
-
-
+
-
+
+
+#sorted
, reordering will be disabled.Nested trees
+
+
+
maxNestingDepth
to the desired value.
+
+Limitations
+Use in search
#viewType=table
attribute.
However, there are also some limitations:
Columns are supported, by being defined as Promoted Attributes to the diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index 35ab128cb..3792a0457 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -3739,13 +3739,6 @@ "isInheritable": false, "position": 10 }, - { - "type": "relation", - "name": "internalLink", - "value": "m1lbrzyKDaRB", - "isInheritable": false, - "position": 20 - }, { "type": "relation", "name": "internalLink", @@ -3780,6 +3773,20 @@ "value": "bx bx-table", "isInheritable": false, "position": 10 + }, + { + "type": "relation", + "name": "internalLink", + "value": "m1lbrzyKDaRB", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "BlN9DFI679QC", + "isInheritable": false, + "position": 80 } ], "format": "markdown", diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md index dadae0183..b74047cd2 100644 --- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md +++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md @@ -3,6 +3,24 @@ 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. +## How it works + +The tabular structure is represented as such: + +* Each child note is a row in the table. +* If child rows also have children, they will be displayed under an expander (nested notes). +* Each column is a [promoted attribute](../../../Advanced%20Usage/Attributes/Promoted%20Attributes.md) that is defined on the Collection note. + * Actually, both promoted and unpromoted attributes are supported, but it's a requirement to use a label/relation definition. + * The promoted attributes are usually defined as inheritable in order to show up in the child notes, but it's not a requirement. +* If there are multiple attribute definitions with the same `name`, only one will be displayed. + +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. + ## Interaction ### Creating a new table @@ -11,23 +29,44 @@ Right click the Note ID, representing the unique ID used internally by Trilium -* The title of the note. +* Press _Add new column_ at the bottom of the table. +* Right click on an existing column and select Add column to the left/right. +* Right click on the empty space of the column header and select _New column_. ### 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. +To create a new note, either: -Alternatively, the note can be created from theNote Tree or [scripting](../../../Scripting.md). +* Press _Add new row_ at the bottom of the table. +* Right click on an existing row and select _Insert row above, Insert child note_ or _Insert row below_. + +By default it will try to edit the title of the newly created note. + +Alternatively, the note can be created from the Note Tree or [scripting](../../../Scripting.md). + +### Context menu + +There are multiple menus: + +* Right clicking on a column, allows: + * Sorting by the selected column and resetting the sort. + * Hiding the selected column or adjusting the visibility of every column. + * Adding new columns to the left or the right of the column. + * Editing the current column. + * Deleting the current column. +* Right clicking on the space to the right of the columns, allows: + * Adjusting the visibility of every column. + * Adding new columns. +* Right clicking on a row, allows: + * Opening the corresponding note of the row in a new tab, split, window or quick editing it. + * Inserting rows above, below or as a child note. + * Deleting the row. ### Editing data @@ -35,16 +74,25 @@ Simply click on a cell within a row to change its value. The change will not onl * 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. +* Editing relations is also possible + * Simply click on a relation and it will become editable. Enter the text to look for a note and click on it. + * To remove a relation, remove the title of the note from the text box and press Enter. + +### Editing columns + +It is possible to edit a column by right clicking it and selecting _Edit column._ This will basically change the label/relation definition at the collection level. + +If the _Name_ field of a column is changed, this will trigger a batch operation in which the corresponding label/relation will be renamed in all the children. ## Working with the data -### Sorting +### Sorting by column -It is possible to sort the data by the values of a column: +By default, the order of the notes matches the order in the Note Tree. However, 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. +* To disable sorting and fall back to the original order, right click any column on the header and select _Clear sorting._ ### Reordering and hiding columns @@ -53,19 +101,37 @@ It is possible to sort the data by the values of a 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. +Notes can be dragged around to change their order. To do so, move the mouse over the three vertical dots near the number row and drag the mouse to the desired position. -Currently, it's possible to reorder notes even if sorting is used, but the result might be inconsistent. +This will also change the order of the note in the Note Tree. + +Reordering does have some limitations: + +* If the parent note has `#sorted`, reordering will be disabled. +* If using nested tables, then reordering will also be disabled. +* Currently, it's possible to reorder notes even if column sorting is used, but the result might be inconsistent. + +### Nested trees + +If the child notes of the collection also have their own child notes, then they will be displayed in a hierarchy. + +Next to the title of each element there will be a button to expand or collapse. By default, all items are expanded. + +Since nesting is not always desirable, it is possible to limit the nesting to a certain number of levels or even disable it completely. To do so, either: + +* Go to _Collection Properties_ in the Ribbon and look for the _Max nesting depth_ section. + * To disable nesting, type 0 and press Enter. + * To limit to a certain depth, type in the desired number (e.g. 2 to only display children and sub-children). + * To re-enable unlimited nesting, remove the number and press Enter. +* Manually set `maxNestingDepth` to the desired value. + +Limitations: + +* While in this mode, it's not possible to reorder notes. ## 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. +Multi-value labels and relations are not supported. If a Promoted Attributes is defined with a _Multi value_ specificity, they will be ignored. ## Use in search