You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Queries/Query File Defaults.md
+26-7Lines changed: 26 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,35 @@ publish: true
7
7
> [!released]
8
8
> Introduced in Tasks X.Y.Z.
9
9
10
+
## Benefits
11
+
12
+
This is a somewhat specialised facility that enables you to:
13
+
14
+
1.**Modify [[layout]] options in a Tasks Query without editing the `tasks` code block source.**
15
+
- This could save you switching repeatedly between Reading and Editing modes.
16
+
- Perhaps you usually like to see your Tasks search results with certain [[Layout]] options, but sometimes it is nice to see more detail, perhaps turning `show tree` on and off, depending on your mood.
17
+
2.**Automatically insert one or more instructions in to all the `tasks` code blocks in a file.**
18
+
- You have multiple Tasks queries in a Markdown file, and they have a lot of text in common.
19
+
- You would like to avoid repeating those common instructions in each one, because keeping them consistent is tedious and error-prone.
20
+
3.**Remind yourself what all `tasks` code blocks in a file do.**
21
+
- Quickly turn [[Explaining Queries|explain]] on and off, for when you need a reminder, or are wondering why some tasks are not included in a search.
22
+
10
23
## Summary
11
24
12
-
Scenarios:
25
+
**Query File Defaults** are like the [[Global Query]] only more specific:
26
+
27
+
- The Global Query:
28
+
- applies to **all queries in the vault**,
29
+
- is defined in the **Tasks Settings**.
30
+
- Query File Defaults:
31
+
- apply to **all queries in a file**,
32
+
- is defined in **one or more standard [[#Supported Query File Defaults property values|named properties]] at the start of the file**.
33
+
34
+
Structure of this page:
13
35
14
-
- You have multiple Tasks queries in a Markdown file, and they have a lot of
15
-
text in common. You would like to avoid repeating those common instructions in
16
-
each one.
17
-
- Usually you like to see your Tasks search results with certain [[Layout]]
18
-
options, but sometimes it is nice to see more detail, perhaps turning
19
-
`show tree` on and off, depending on your mood.
36
+
- This page uses [[#examples]] to demonstrate the mechanism.
37
+
- It then shows how to easily adjust a file's Query File Defaults using the [[#Obsidian-native user interface]] and a [[#Meta Bind user interface]].
38
+
- Finally, it gives [[#technical details]] and records [[#Limitations of Query File Defaults|limitations]].
0 commit comments