feat(docs): document bulk actions

This commit is contained in:
Elian Doran 2025-04-08 19:35:13 +03:00
parent 8949f68b81
commit 2b56c2acbe
No known key found for this signature in database
16 changed files with 821 additions and 518 deletions

View File

@ -1199,6 +1199,13 @@
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
@ -1212,13 +1219,6 @@
"value": "bx bxs-tree-alt",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 60
}
],
"format": "markdown",
@ -1427,13 +1427,6 @@
"value": "bx bx-dots-horizontal",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "_optionsAppearance",
"isInheritable": false,
"position": 220
}
],
"format": "markdown",
@ -3317,6 +3310,13 @@
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "shareAlias",
@ -3330,13 +3330,6 @@
"value": "bx bx-door-open",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 40
}
],
"format": "markdown",
@ -5180,35 +5173,35 @@
{
"type": "relation",
"name": "internalLink",
"value": "CdNpE2pqjmI6",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "iPIMuisry3hd",
"value": "4TIF1oA4VQRO",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "QxEyIjRBizuC",
"value": "CdNpE2pqjmI6",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "iPIMuisry3hd",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "4TIF1oA4VQRO",
"value": "QxEyIjRBizuC",
"isInheritable": false,
"position": 50
},
@ -6697,17 +6690,38 @@
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"isInheritable": false,
"position": 50
},
{
"type": "label",
"name": "shareAlias",
@ -6721,27 +6735,6 @@
"value": "bx bx-list-check",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 130
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 140
}
],
"format": "markdown",
@ -6784,7 +6777,7 @@
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 20
},
@ -6796,23 +6789,30 @@
"position": 30
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hash",
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "vZWERwf8U3nx",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"value": "vZWERwf8U3nx",
"isInheritable": false,
"position": 70
},
@ -6833,170 +6833,156 @@
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "CoFPLs3dRlXc",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
"value": "CoFPLs3dRlXc",
"value": "AlhDUqhENtH7",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "AlhDUqhENtH7",
"value": "pKK96zzmvBGf",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
"value": "pKK96zzmvBGf",
"value": "WFGzWeUK6arS",
"isInheritable": false,
"position": 130
},
{
"type": "relation",
"name": "internalLink",
"value": "WFGzWeUK6arS",
"value": "0ESUbbAxVnoK",
"isInheritable": false,
"position": 140
},
{
"type": "relation",
"name": "internalLink",
"value": "0ESUbbAxVnoK",
"value": "J5Ex1ZrMbyJ6",
"isInheritable": false,
"position": 150
},
{
"type": "relation",
"name": "internalLink",
"value": "J5Ex1ZrMbyJ6",
"value": "d3fAXQ2diepH",
"isInheritable": false,
"position": 160
},
{
"type": "relation",
"name": "internalLink",
"value": "d3fAXQ2diepH",
"value": "MgibgPcfeuGz",
"isInheritable": false,
"position": 170
},
{
"type": "relation",
"name": "internalLink",
"value": "MgibgPcfeuGz",
"value": "m523cpzocqaD",
"isInheritable": false,
"position": 180
},
{
"type": "relation",
"name": "internalLink",
"value": "m523cpzocqaD",
"value": "9sRHySam5fXb",
"isInheritable": false,
"position": 190
},
{
"type": "relation",
"name": "internalLink",
"value": "9sRHySam5fXb",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 200
},
{
"type": "relation",
"name": "internalLink",
"value": "_help_YKWqdJhzi2VY",
"value": "R9pX4DGra2Vt",
"isInheritable": false,
"position": 210
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"value": "iRwzGnHPzonm",
"isInheritable": false,
"position": 220
},
{
"type": "relation",
"name": "internalLink",
"value": "R9pX4DGra2Vt",
"value": "BCkXAVs63Ttv",
"isInheritable": false,
"position": 230
},
{
"type": "relation",
"name": "internalLink",
"value": "iRwzGnHPzonm",
"value": "47ZrP6FNuoG8",
"isInheritable": false,
"position": 240
},
{
"type": "relation",
"name": "internalLink",
"value": "BCkXAVs63Ttv",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 250
},
{
"type": "relation",
"name": "internalLink",
"value": "47ZrP6FNuoG8",
"value": "BFvAtE74rbP6",
"isInheritable": false,
"position": 260
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 270
},
{
"type": "relation",
"name": "internalLink",
"value": "BFvAtE74rbP6",
"value": "AxshuNRegLAv",
"isInheritable": false,
"position": 280
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"value": "81SGnPGMk7Xc",
"isInheritable": false,
"position": 290
},
{
"type": "relation",
"name": "internalLink",
"value": "AxshuNRegLAv",
"value": "xWbu3jpNWapp",
"isInheritable": false,
"position": 300
},
{
"type": "relation",
"name": "internalLink",
"value": "81SGnPGMk7Xc",
"type": "label",
"name": "iconClass",
"value": "bx bx-hash",
"isInheritable": false,
"position": 310
},
{
"type": "relation",
"name": "internalLink",
"value": "xWbu3jpNWapp",
"isInheritable": false,
"position": 320
},
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 330
"position": 40
}
],
"format": "markdown",
@ -7027,67 +7013,67 @@
"position": 10
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-transfer",
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "bwZpz2ajCEwO",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"value": "HcABDtFCkbFN",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "oPVyFC7WL2Lp",
"value": "R9pX4DGra2Vt",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "GPERMystNGTB",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "HcABDtFCkbFN",
"value": "oPVyFC7WL2Lp",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "GPERMystNGTB",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "R9pX4DGra2Vt",
"type": "label",
"name": "iconClass",
"value": "bx bx-transfer",
"isInheritable": false,
"position": 100
"position": 20
}
],
"format": "markdown",
@ -7110,6 +7096,27 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
@ -7123,27 +7130,6 @@
"value": "bx bx-list-plus",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 60
}
],
"format": "markdown",
@ -7412,6 +7398,13 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "WOcw2SLH6tbX",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
@ -7419,6 +7412,13 @@
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "6f9hih2hXXZk",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
@ -7426,6 +7426,13 @@
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "Qjt68inQ2bRj",
"isInheritable": false,
"position": 50
},
{
"type": "label",
"name": "shareAlias",
@ -7439,27 +7446,6 @@
"value": "bx bx-share-alt",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "6f9hih2hXXZk",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "WOcw2SLH6tbX",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "Qjt68inQ2bRj",
"isInheritable": false,
"position": 70
}
],
"format": "markdown",
@ -8073,25 +8059,25 @@
"position": 10
},
{
"type": "label",
"name": "shareAlias",
"value": "default-note-title",
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"isInheritable": false,
"position": 30
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 40
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"type": "label",
"name": "shareAlias",
"value": "default-note-title",
"isInheritable": false,
"position": 50
"position": 30
}
],
"format": "markdown",
@ -8415,7 +8401,7 @@
"tC7s2alapj8V",
"ivYnonVFBxbQ"
],
"title": "Bulk actions",
"title": "Bulk Actions",
"notePosition": 180,
"prefix": null,
"isExpanded": false,
@ -8428,11 +8414,55 @@
"value": "bx bx-list-plus",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "oPVyFC7WL2Lp",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "vZWERwf8U3nx",
"isInheritable": false,
"position": 60
}
],
"format": "markdown",
"dataFileName": "Bulk actions.md",
"attachments": []
"dataFileName": "Bulk Actions.md",
"attachments": [
{
"attachmentId": "cJTc66E2BRTf",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Bulk Actions_image.png"
}
]
},
{
"isClone": false,
@ -8793,88 +8823,88 @@
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "x3i7MxGccDuM",
"isInheritable": false,
"position": 10
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hide",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "eIg8jdvaoNNd",
"isInheritable": false,
"position": 50
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "wX4HbRucYSDD",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "m1lbrzyKDaRB",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "xYmIYSP6wE3F",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 100
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "YKWqdJhzi2VY",
"isInheritable": false,
"position": 110
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "eIg8jdvaoNNd",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "QEAPj01N5f7w",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "m1lbrzyKDaRB",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "x3i7MxGccDuM",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
"value": "xYmIYSP6wE3F",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 120
},
{
@ -8905,6 +8935,13 @@
"isInheritable": false,
"position": 160
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hide",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
@ -8988,13 +9025,6 @@
"value": "_help",
"isInheritable": false,
"position": 280
},
{
"type": "relation",
"name": "internalLink",
"value": "QEAPj01N5f7w",
"isInheritable": false,
"position": 290
}
],
"format": "markdown",
@ -9113,21 +9143,21 @@
{
"type": "relation",
"name": "internalLink",
"value": "GLks18SNjxmC",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"value": "SynTBQiBsdYJ",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "SynTBQiBsdYJ",
"value": "GLks18SNjxmC",
"isInheritable": false,
"position": 30
},
@ -9314,25 +9344,11 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "CdNpE2pqjmI6",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "shareAlias",
"value": "events",
"isInheritable": false,
"position": 10
},
{
@ -9340,8 +9356,22 @@
"name": "internalLink",
"value": "c5xB8m4g2IY6",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
"value": "events",
"isInheritable": false,
"position": 10
},
{
"type": "label",
"name": "iconClass",

View File

@ -9,7 +9,6 @@ In Trilium, attributes are key-value pairs assigned to notes, providing addition
2. <a class="reference-link" href="Attributes/Relations.md">Relations</a> define connections between notes, similar to links. These can be used for metadata and scripting purposes.
For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -1,15 +1,86 @@
# Bulk actions
### Execute script
# Bulk Actions
<figure class="image"><img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425" height="654"></figure>
For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
The _Bulk Actions_ dialog makes it easy to apply changes to multiple notes at once, ranging from simple actions such as adding or removing a label to being executing custom scripts.
To apply a suffix (`- suffix` in this example), to the note title:
## Interaction
* The first step is to select the notes in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>:
* It's possible to apply bulk actions to a single note (and potentially its child notes) simply by clicking on it (with a left click or a right click).
* To select a range of notes, select the start note, hold <kbd>Shift</kbd> and select the end note. The selected notes will appear highlighted in the note tree.
* Right click in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and select _Advanced__Apply bulk actions_.
* By default, only the selected notes will be affected. To also include all the descendants of the notes, check _Include descendants of the selected notes_. The number of affected notes at the top of the dialog will update to reflect the change.
* Click on which action to apply from the _Available actions_ section. A detailed description of each is available in the next section.
* For each action selected, the _Chosen actions_ section will update to reveal the entry. Each action will have its own configuration.
* To remove an action, simply press the X button to the right of it.
* It is possible to apply multiple actions of the same type, such as adding multiple types.
* When all the actions are defined, press _Execute bulk actions_ to trigger all of them at once.
* For convenience, the last bulk action configuration is saved for further use and will be restored when entering the dialog again.
## Actions
### Labels
These actions operate the <a class="reference-link" href="Attributes/Labels.md">Labels</a> of a note:
* **Add label**
* For each note, if it doesn't already have a [label](Attributes/Labels.md) of the given name, it will create it. Keep the _New value_ field empty to create a label without a value, or complete it to assign a value.
* If a note already has this label, its value will be updated.
* **Update label value**
* For each note, if it has a [label](Attributes/Labels.md) of the given name, it will change its value to the specified one. Leave _New value_ field empty to create a label without a value.
* Notes without the label will not be affected.
* _**Rename label**_
* For each note, if it has a [label](Attributes/Labels.md) of the given name, it will be renamed/replaced with a label of the new name. The value of the label (if present) will be kept intact.
* Notes without the label will not be affected.
* **Delete label**
* For each note, if it has a label of a given name, it will be deleted (regardless of whether it has a value or not).
* Notes without the label will not be affected.
### Relations
These actions operate the <a class="reference-link" href="Attributes/Relations.md">Relations</a> of a note:
* **Add relation**
* For each note, it will create a relation pointing to the given note.
* Notes without this relation will not be affected.
* **Update relation target**
* For each note, it will modify a relation to point to the newly given note.
* Notes without this relation will not be affected.
* **Rename relation**
* For each note, if it has a relation of the given name, it will be renamed/replaced with a relation of the new name. The target note of the relation will be kept intact.
* Notes without this relation will not be affected.
* **Delete relation**
* For each note, if it has a relation of the given name, it will be deleted.
* Notes without this relation will not be affected.
### Notes
* **Rename note**
* For each note, it will change the title of the note to the given one.
* As a more advanced use case, the note can be a “template string” which allows for dynamic values with access to the note information via <a class="reference-link" href="../Scripting/Script%20API/Frontend%20API/FNote.md">FNote</a>, for example:
* `NEW: ${note.title}` will prefix all notes with `NEW:` .
* `${note.dateCreatedObj.format('MM-DD:')}: ${note.title}` will prefix the note titles with each note's creation date (in month-day format).
* **Move note**
* For each note, it will be moved to the specified parent note.
* As an alternative for less complex situations, the notes can be moved directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> via cut → paste or via the contextual menu.
* **Delete note**
* For each note, it will be deleted.
* As an alternative for less complex situations, the notes can be removed directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> by selecting them and pressing <kbd>Delete</kbd>.
* **Delete note revisions**
* This will delete all the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20Revisions.md">Note Revisions</a> of the notes.
### Others
* **Execute script**
* For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
* Examples:
* To apply a suffix (`- suffix` in this example), to the note title:
```javascript
note.title = note.title + " - suffix";
```
To alter attributes of a note in a bulk action, such as setting the `#shareAlias` label to the title of the note:
* To alter attributes of a note based on another attribute, such as setting the `#shareAlias` label to the title of the note:
```javascript
note.setLabel("shareAlias", note.title)

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@ Workspace is a concept built up on top of [note hoisting](Note%20Hoisting.md). I
So far workspace consists of these features:
* [note hoisting](Note%20Hoisting.md) - you can "zoom" into a workspace subtree to focus only on the relevant notes
* easy entering of workspace: 
![](1_Workspaces_image.png)
@ -11,6 +12,7 @@ So far workspace consists of these features:
* visual identification of workspace in tabs:
![](Workspaces_image.png)
### Configuration
<figure class="table"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>workspace</code></td><td>Marks this note as a workspace, button to enter the workspace is controlled by this</td></tr><tr><td><code>workspaceIconClass</code></td><td>defines box icon CSS class which will be used in tab when hoisted to this note</td></tr><tr><td><code>workspaceTabBackgroundColor</code></td><td>CSS color used in the note tab when hoisted to this note, use any CSS color format, e.g. "lightblue" or "#ddd". See <a href="https://www.w3schools.com/cssref/css_colors.asp">https://www.w3schools.com/cssref/css_colors.asp</a>.</td></tr><tr><td><code>workspaceCalendarRoot</code></td><td>Marking a note with this label will define a new per-workspace calendar for&nbsp;<a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md">Day Notes</a>. If there's no such note, the global calendar will be used.</td></tr><tr><td><code>workspaceTemplate</code></td><td>This note will appear in the selection of available template when creating new note, but only when hoisted into a workspace containing this template</td></tr><tr><td><code>workspaceSearchHome</code></td><td>new search notes will be created as children of this note when hoisted to some ancestor of this workspace note</td></tr><tr><td><code>workspaceInbox</code></td><td>default inbox location for new notes when hoisted to some ancestor of this workspace note</td></tr></tbody></table></figure>

View File

@ -30,4 +30,4 @@ To do so, first select the note to start the selection with. Then hold Shift and
![](Note%20Tree_image.png)
In the right-click menu, operations such as Cut, Copy, Move to, Clone to or Delete will apply to all the selected notes. It is also possible to apply <a class="reference-link" href="../../Advanced%20Usage/Bulk%20actions.md">Bulk actions</a> to them. The rest of the options will not be available and will appear disabled in the menu.
In the right-click menu, operations such as Cut, Copy, Move to, Clone to or Delete will apply to all the selected notes. It is also possible to apply <a class="reference-link" href="../../Advanced%20Usage/Bulk%20Actions.md">Bulk actions</a> to them. The rest of the options will not be available and will appear disabled in the menu.

View File

@ -1199,6 +1199,13 @@
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
@ -1212,13 +1219,6 @@
"value": "bx bxs-tree-alt",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 60
}
],
"format": "html",
@ -1427,13 +1427,6 @@
"value": "bx bx-dots-horizontal",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "_optionsAppearance",
"isInheritable": false,
"position": 220
}
],
"format": "html",
@ -3317,6 +3310,13 @@
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "shareAlias",
@ -3330,13 +3330,6 @@
"value": "bx bx-door-open",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 40
}
],
"format": "html",
@ -5180,35 +5173,35 @@
{
"type": "relation",
"name": "internalLink",
"value": "CdNpE2pqjmI6",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "iPIMuisry3hd",
"value": "4TIF1oA4VQRO",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "QxEyIjRBizuC",
"value": "CdNpE2pqjmI6",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "iPIMuisry3hd",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "4TIF1oA4VQRO",
"value": "QxEyIjRBizuC",
"isInheritable": false,
"position": 50
},
@ -6697,17 +6690,38 @@
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"isInheritable": false,
"position": 50
},
{
"type": "label",
"name": "shareAlias",
@ -6721,27 +6735,6 @@
"value": "bx bx-list-check",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 130
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 140
}
],
"format": "html",
@ -6784,7 +6777,7 @@
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 20
},
@ -6796,23 +6789,30 @@
"position": 30
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hash",
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "vZWERwf8U3nx",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "l0tKav7yLHGF",
"value": "vZWERwf8U3nx",
"isInheritable": false,
"position": 70
},
@ -6833,170 +6833,156 @@
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "CoFPLs3dRlXc",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
"value": "CoFPLs3dRlXc",
"value": "AlhDUqhENtH7",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "AlhDUqhENtH7",
"value": "pKK96zzmvBGf",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
"value": "pKK96zzmvBGf",
"value": "WFGzWeUK6arS",
"isInheritable": false,
"position": 130
},
{
"type": "relation",
"name": "internalLink",
"value": "WFGzWeUK6arS",
"value": "0ESUbbAxVnoK",
"isInheritable": false,
"position": 140
},
{
"type": "relation",
"name": "internalLink",
"value": "0ESUbbAxVnoK",
"value": "J5Ex1ZrMbyJ6",
"isInheritable": false,
"position": 150
},
{
"type": "relation",
"name": "internalLink",
"value": "J5Ex1ZrMbyJ6",
"value": "d3fAXQ2diepH",
"isInheritable": false,
"position": 160
},
{
"type": "relation",
"name": "internalLink",
"value": "d3fAXQ2diepH",
"value": "MgibgPcfeuGz",
"isInheritable": false,
"position": 170
},
{
"type": "relation",
"name": "internalLink",
"value": "MgibgPcfeuGz",
"value": "m523cpzocqaD",
"isInheritable": false,
"position": 180
},
{
"type": "relation",
"name": "internalLink",
"value": "m523cpzocqaD",
"value": "9sRHySam5fXb",
"isInheritable": false,
"position": 190
},
{
"type": "relation",
"name": "internalLink",
"value": "9sRHySam5fXb",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 200
},
{
"type": "relation",
"name": "internalLink",
"value": "_help_YKWqdJhzi2VY",
"value": "R9pX4DGra2Vt",
"isInheritable": false,
"position": 210
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"value": "iRwzGnHPzonm",
"isInheritable": false,
"position": 220
},
{
"type": "relation",
"name": "internalLink",
"value": "R9pX4DGra2Vt",
"value": "BCkXAVs63Ttv",
"isInheritable": false,
"position": 230
},
{
"type": "relation",
"name": "internalLink",
"value": "iRwzGnHPzonm",
"value": "47ZrP6FNuoG8",
"isInheritable": false,
"position": 240
},
{
"type": "relation",
"name": "internalLink",
"value": "BCkXAVs63Ttv",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 250
},
{
"type": "relation",
"name": "internalLink",
"value": "47ZrP6FNuoG8",
"value": "BFvAtE74rbP6",
"isInheritable": false,
"position": 260
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 270
},
{
"type": "relation",
"name": "internalLink",
"value": "BFvAtE74rbP6",
"value": "AxshuNRegLAv",
"isInheritable": false,
"position": 280
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"value": "81SGnPGMk7Xc",
"isInheritable": false,
"position": 290
},
{
"type": "relation",
"name": "internalLink",
"value": "AxshuNRegLAv",
"value": "xWbu3jpNWapp",
"isInheritable": false,
"position": 300
},
{
"type": "relation",
"name": "internalLink",
"value": "81SGnPGMk7Xc",
"type": "label",
"name": "iconClass",
"value": "bx bx-hash",
"isInheritable": false,
"position": 310
},
{
"type": "relation",
"name": "internalLink",
"value": "xWbu3jpNWapp",
"isInheritable": false,
"position": 320
},
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 330
"position": 40
}
],
"format": "html",
@ -7027,67 +7013,67 @@
"position": 10
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-transfer",
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "BlN9DFI679QC",
"value": "bwZpz2ajCEwO",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "bwZpz2ajCEwO",
"value": "HcABDtFCkbFN",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "oPVyFC7WL2Lp",
"value": "R9pX4DGra2Vt",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "GPERMystNGTB",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"value": "BlN9DFI679QC",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "HcABDtFCkbFN",
"value": "oPVyFC7WL2Lp",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"value": "GPERMystNGTB",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "R9pX4DGra2Vt",
"type": "label",
"name": "iconClass",
"value": "bx bx-transfer",
"isInheritable": false,
"position": 100
"position": 20
}
],
"format": "html",
@ -7110,6 +7096,27 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
@ -7123,27 +7130,6 @@
"value": "bx bx-list-plus",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 60
}
],
"format": "html",
@ -7412,6 +7398,13 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "WOcw2SLH6tbX",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
@ -7419,6 +7412,13 @@
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "6f9hih2hXXZk",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
@ -7426,6 +7426,13 @@
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "Qjt68inQ2bRj",
"isInheritable": false,
"position": 50
},
{
"type": "label",
"name": "shareAlias",
@ -7439,27 +7446,6 @@
"value": "bx bx-share-alt",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "6f9hih2hXXZk",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "WOcw2SLH6tbX",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "Qjt68inQ2bRj",
"isInheritable": false,
"position": 70
}
],
"format": "html",
@ -8073,25 +8059,25 @@
"position": 10
},
{
"type": "label",
"name": "shareAlias",
"value": "default-note-title",
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"isInheritable": false,
"position": 30
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 40
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"type": "label",
"name": "shareAlias",
"value": "default-note-title",
"isInheritable": false,
"position": 50
"position": 30
}
],
"format": "html",
@ -8415,7 +8401,7 @@
"tC7s2alapj8V",
"ivYnonVFBxbQ"
],
"title": "Bulk actions",
"title": "Bulk Actions",
"notePosition": 180,
"prefix": null,
"isExpanded": false,
@ -8428,11 +8414,55 @@
"value": "bx bx-list-plus",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "oPVyFC7WL2Lp",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "HI6GBBIduIgv",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "habiZ3HU8Kw8",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "vZWERwf8U3nx",
"isInheritable": false,
"position": 60
}
],
"format": "html",
"dataFileName": "Bulk actions.html",
"attachments": []
"dataFileName": "Bulk Actions.html",
"attachments": [
{
"attachmentId": "cJTc66E2BRTf",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Bulk Actions_image.png"
}
]
},
{
"isClone": false,
@ -8793,88 +8823,88 @@
"type": "text",
"mime": "text/html",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "x3i7MxGccDuM",
"isInheritable": false,
"position": 10
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hide",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "Cq5X6iKQop6R",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "eIg8jdvaoNNd",
"isInheritable": false,
"position": 50
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "wX4HbRucYSDD",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "m1lbrzyKDaRB",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "xYmIYSP6wE3F",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 100
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "YKWqdJhzi2VY",
"isInheritable": false,
"position": 110
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "ivYnonVFBxbQ",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "eIg8jdvaoNNd",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "QEAPj01N5f7w",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "m1lbrzyKDaRB",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "x3i7MxGccDuM",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "bdUJEHsAPYQR",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
"value": "xYmIYSP6wE3F",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "u3YFHC9tQlpm",
"isInheritable": false,
"position": 120
},
{
@ -8905,6 +8935,13 @@
"isInheritable": false,
"position": 160
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-hide",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
@ -8988,13 +9025,6 @@
"value": "_help",
"isInheritable": false,
"position": 280
},
{
"type": "relation",
"name": "internalLink",
"value": "QEAPj01N5f7w",
"isInheritable": false,
"position": 290
}
],
"format": "html",
@ -9113,21 +9143,21 @@
{
"type": "relation",
"name": "internalLink",
"value": "GLks18SNjxmC",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"value": "SynTBQiBsdYJ",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "SynTBQiBsdYJ",
"value": "GLks18SNjxmC",
"isInheritable": false,
"position": 30
},
@ -9314,25 +9344,11 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "CdNpE2pqjmI6",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "shareAlias",
"value": "events",
"isInheritable": false,
"position": 10
},
{
@ -9340,8 +9356,22 @@
"name": "internalLink",
"value": "c5xB8m4g2IY6",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
"value": "events",
"isInheritable": false,
"position": 10
},
{
"type": "label",
"name": "iconClass",

View File

@ -23,18 +23,15 @@
<li>
<p><a class="reference-link" href="Attributes/Labels.html">Labels</a>&nbsp;can
be used for a variety of purposes, such as storing metadata or configuring
the behaviour of notes. Labels are also searchable, enhancing note retrieval.
<br>
<br>For more information, including predefined labels, see&nbsp;<a class="reference-link"
the behaviour of notes. Labels are also searchable, enhancing note retrieval.</p>
<p>For more information, including predefined labels, see&nbsp;<a class="reference-link"
href="Attributes/Labels.html">Labels</a>.</p>
<p>&nbsp;</p>
</li>
<li>
<p><a class="reference-link" href="Attributes/Relations.html">Relations</a>&nbsp;define
connections between notes, similar to links. These can be used for metadata
and scripting purposes.</p>
<p>
<br>For more information, including a list of predefined relations, see&nbsp;
<p>For more information, including a list of predefined relations, see&nbsp;
<a
class="reference-link" href="Attributes/Relations.html">Relations</a>.</p>
</li>

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -5,21 +5,184 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Bulk actions</title>
<title data-trilium-title>Bulk Actions</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Bulk actions</h1>
<h1 data-trilium-h1>Bulk Actions</h1>
<div class="ck-content">
<h3>Execute script</h3>
<p>For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.</p>
<figure class="image">
<img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425"
height="654">
</figure>
<p>The <em>Bulk Actions</em> dialog makes it easy to apply changes to multiple
notes at once, ranging from simple actions such as adding or removing a
label to being executing custom scripts.</p>
<h2>Interaction</h2>
<ul>
<li>The first step is to select the notes in the&nbsp;<a class="reference-link"
href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.html">Note Tree</a>:
<ul>
<li>It's possible to apply bulk actions to a single note (and potentially
its child notes) simply by clicking on it (with a left click or a right
click).</li>
<li>To select a range of notes, select the start note, hold <kbd>Shift</kbd> and
select the end note. The selected notes will appear highlighted in the
note tree.</li>
</ul>
</li>
<li>Right click in the&nbsp;<a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.html">Note Tree</a>&nbsp;and
select <em>Advanced </em><em>Apply bulk actions</em>.</li>
<li>By default, only the selected notes will be affected. To also include
all the descendants of the notes, check <em>Include descendants of the selected notes</em>.
The number of affected notes at the top of the dialog will update to reflect
the change.</li>
<li>Click on which action to apply from the <em>Available actions</em> section.
A detailed description of each is available in the next section.
<ul>
<li>For each action selected, the <em>Chosen actions</em> section will update
to reveal the entry. Each action will have its own configuration.</li>
<li>To remove an action, simply press the X button to the right of it.</li>
<li>It is possible to apply multiple actions of the same type, such as adding
multiple types.</li>
</ul>
</li>
<li>When all the actions are defined, press <em>Execute bulk actions</em> to
trigger all of them at once.</li>
<li>For convenience, the last bulk action configuration is saved for further
use and will be restored when entering the dialog again.</li>
</ul>
<h2>Actions</h2>
<h3>Labels</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="Attributes/Labels.html">Labels</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add label</strong>
<ul>
<li>For each note, if it doesn't already have a <a href="Attributes/Labels.html">label</a> of
the given name, it will create it. Keep the <em>New value</em> field empty
to create a label without a value, or complete it to assign a value.</li>
<li>If a note already has this label, its value will be updated.</li>
</ul>
</li>
<li><strong>Update label value</strong>
<ul>
<li>For each note, if it has a <a href="Attributes/Labels.html">label</a> of
the given name, it will change its value to the specified one. Leave <em>New value</em> field
empty to create a label without a value.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><em><strong>Rename label</strong></em>
<ul>
<li>For each note, if it has a <a href="Attributes/Labels.html">label</a> of
the given name, it will be renamed/replaced with a label of the new name.
The value of the label (if present) will be kept intact.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><strong>Delete label</strong>
<ul>
<li>For each note, if it has a label of a given name, it will be deleted (regardless
of whether it has a value or not).</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
</ul>
<h3>Relations</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="Attributes/Relations.html">Relations</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add relation</strong>
<ul>
<li>For each note, it will create a relation pointing to the given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Update relation target</strong>
<ul>
<li>For each note, it will modify a relation to point to the newly given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Rename relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be renamed/replaced
with a relation of the new name. The target note of the relation will be
kept intact.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Delete relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be deleted.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
</ul>
<h3>Notes</h3>
<ul>
<li><strong>Rename note</strong>
<ul>
<li>For each note, it will change the title of the note to the given one.</li>
<li>As a more advanced use case, the note can be a “template string” which
allows for dynamic values with access to the note information via&nbsp;
<a
class="reference-link" href="../Scripting/Script%20API/Frontend%20API/FNote.html">FNote</a>, for example:
<ul>
<li><code>NEW: ${note.title}</code> will prefix all notes with <code>NEW: </code>.</li>
<li><code>${note.dateCreatedObj.format('MM-DD:')}: ${note.title}</code> will
prefix the note titles with each note's creation date (in month-day format).</li>
</ul>
</li>
</ul>
</li>
<li><strong>Move note</strong>
<ul>
<li>For each note, it will be moved to the specified parent note.</li>
<li>As an alternative for less complex situations, the notes can be moved
directly from within the&nbsp;<a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.html">Note Tree</a>&nbsp;via
cut → paste or via the contextual menu.</li>
</ul>
</li>
<li><strong>Delete note</strong>
<ul>
<li>For each note, it will be deleted.</li>
<li>As an alternative for less complex situations, the notes can be removed
directly from within the&nbsp;<a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.html">Note Tree</a>&nbsp;by
selecting them and pressing <kbd>Delete</kbd>.</li>
</ul>
</li>
<li><strong>Delete note revisions</strong>
<ul>
<li>This will delete all the&nbsp;<a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20Revisions.html">Note Revisions</a>&nbsp;of
the notes.</li>
</ul>
</li>
</ul>
<h3>Others</h3>
<ul>
<li><strong>Execute script</strong>
<ul>
<li>For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.</li>
<li>Examples:
<ul>
<li>
<p>To apply a suffix (<code>- suffix</code> in this example), to the note
title:</p><pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>
<p>To alter attributes of a note in a bulk action, such as setting the <code>#shareAlias</code> label
to the title of the note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
</li>
<li>
<p>To alter attributes of a note based on another attribute, such as setting
the <code>#shareAlias</code> label to the title of the note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</body>

View File

@ -94,7 +94,13 @@
<tr>
<td><a class="reference-link" href="#root/_hidden/_bulkAction">Bulk Action</a>
</td>
<td>This section is used for&nbsp;<a class="reference-link" href="Bulk%20actions.html">Bulk actions</a>.</td>
<td>
<p>This section is used for&nbsp;<a class="reference-link" href="Bulk%20Actions.html">Bulk Actions</a>.
The last configuration for bulk actions will be stored as part of this
note, each action in its own <code>action</code> label.</p>
<p>Notes can be added as children of this tree, but there won't be any benefit
in doing so.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_backendLog">Backend Log</a>

View File

@ -20,17 +20,21 @@
care about personal notes.</p>
<p>So far workspace consists of these features:</p>
<ul>
<li><a href="Note%20Hoisting.html">note hoisting</a> - you can "zoom" into
a workspace subtree to focus only on the relevant notes</li>
<li>
<p><a href="Note%20Hoisting.html">note hoisting</a> - you can "zoom" into
a workspace subtree to focus only on the relevant notes</p>
</li>
<li>
<p>easy entering of workspace:&nbsp;</p>
<p>
<img src="1_Workspaces_image.png">
</p>
</li>
<li>visual identification of workspace in tabs:
<li>
<p>visual identification of workspace in tabs:
<br>
<img src="Workspaces_image.png">
</p>
</li>
</ul>
<h3>Configuration</h3>

View File

@ -55,7 +55,7 @@
</p>
<p>In the right-click menu, operations such as Cut, Copy, Move to, Clone
to or Delete will apply to all the selected notes. It is also possible
to apply&nbsp;<a class="reference-link" href="../../Advanced%20Usage/Bulk%20actions.html">Bulk actions</a>&nbsp;to
to apply&nbsp;<a class="reference-link" href="../../Advanced%20Usage/Bulk%20Actions.html">Bulk actions</a>&nbsp;to
them. The rest of the options will not be available and will appear disabled
in the menu.</p>
</div>

View File

@ -61,6 +61,7 @@
</tbody>
</table>
</figure>
<h2>Entity events</h2>
<p>Other events are bound to some entity, these are defined as <a href="../Advanced%20Usage/Attributes.html">relations</a> -
meaning that script is triggered only if note has this script attached

View File

@ -393,7 +393,7 @@
</li>
</ul>
</li>
<li><a href="User%20Guide/Advanced%20Usage/Bulk%20actions.html" target="detail">Bulk actions</a>
<li><a href="User%20Guide/Advanced%20Usage/Bulk%20Actions.html" target="detail">Bulk Actions</a>
</li>
<li><a href="User%20Guide/Advanced%20Usage/Note%20source.html" target="detail">Note source</a>
</li>