Consider the following example:
## Sample data
- [ ] This is line one #test
- [ ] This is line two #test
- [ ] This is line three #test
- [ ] This is line four #test
## Dataview: Task
```dataview
task
from #test
```
## Dataview: Table
```dataviewjs
const items = dv.pages("#test").file
.tasks
dv.table(
[
"Task",
],
items.map(i => [
"[" + i.text + "](" + i.path + ")",
])
)
```
Which produces the following output:
But I can only get so far as to linking the task to the note.
What I would like to do is to click on the task text and go directly to the task item, exactly like how a dataview tasks
query can do it.
What I Have Tried
- I could link it to the section under a header using
dv.sectionLink
; but that’s too crude a resolution - I could add block-id’s but that’s too much hassle, and, anyway, it appears that dataview does not need that for tasks
So … how does dataview do it’s magic to take me directly to the task without any real reference/anchor?
And how can I replicate that from a dataview javascript query that I can compose in a table?