Skip to content

Commit 75fbbb1

Browse files
committed
vault: Demonstrate finding tasks that link to the query file
1 parent a02cb22 commit 75fbbb1

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

resources/sample_vaults/Tasks-Demo/How To/Access links.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,33 @@ limit groups 1
4949
filter by function task.outlinks.some(link => link.destinationPath === null)
5050
```
5151

52+
### Tasks lines that link to the file containing the query
53+
54+
#### Tasks - version 1
55+
56+
This should match one task, in [[Link to Access links file]].
57+
58+
```tasks
59+
filter by function task.outlinks.some(link => link.destinationPath === query.file.path)
60+
```
61+
62+
#### Tasks - version 2
63+
64+
This should match one task, in [[Link to Access links file]].
65+
66+
There is a bug: this does not yet find the task it should do.
67+
68+
```tasks
69+
filter by function task.outlinks.some(link => link.isLinkTo(query.file))
70+
```
71+
72+
#### Dataview version
73+
74+
```dataview
75+
TASK
76+
WHERE contains(file.outlinks, this.file.link)
77+
```
78+
5279
## Grouping
5380

5481
### Group by task outlinks
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Link to Access links file
2+
3+
- [ ] #task I link to [[Access links]]

0 commit comments

Comments
 (0)