List of ToDos as links

I need to make a list of the words my marker refers to all around my database.

For example I type the text and mark one line by the link - bla bla bla [[ToDo]]:: This is important. bla bla

So I need a table as follows:

Note ToDo
note.md This is important

But same time I can click [[ToDo]] link and see all notes referring to it. So I need to use link as metadata

Things I have tried

If I put mark (Not link )into the text bla bla ToDo:: This is important bla bla I can easily make table with all “This is important” in all my notes. But I want link works as metadata.
Thank you in advance

I’m not quite sure I understand your question completely, you want to list all files containing the ToDo field, then also show all files that match the value? out of curiosity, are you listing ToDo multiple times in one file? Have you considered just using tags?

LIST rows.file.link
WHERE ToDo
GROUP BY ToDo

This will list all files containing a ToDo field. It will group by ToDo value, which will show you all files containing that specific ToDo value as a group.

I should remind you that this won’t work if you are listing the same inline field multiple times in one note, I actually never tested it but I’m assuming it will just overwrite the previous value every time. Judging by your quesiton, it seems you have a finite set of values ToDo can be set to, so tags would work great here because they will even auto-populate as you type. For example: #ToDo/this-is-important, #ToDo/another-important-option. Much easier than declaring a dv field every time

Actually I need a list of files containing todo and next column I need a list of text following [[ToDo]]

I type a text and mark some words by the [[ToDo]]::
I have a Note “Things to Do” where using dataview I have a table of ToDos all around my database…

I did it by using ToDo:: in the text but I also want to refer it as a backlink but I can’t do it now.

I don’t think you can have link as the name of an inline field name. Neither can you have a tag (which is also clickable) as an inline field name.

So some of the options you do have are:

[[ToDo]] [todo:: This is important]
[[ToDo]] (todo:: Also important)
[todo:: [[ToDo]] Why more important]
(todo:: [[ToDo]] Not very important, but nice? )

Which in the default theme displays as:
image

Note that neither of these will produce a direct link to the place of origin when queried somewhere else. But they’ll all display in the backlinks of the [[ToDo]] page, and you can put your query listing all of these within that page.

If you want something which actually links back to the origin, you need to use tasks as some sort, like

- [!] Important stuff

Which in minimal theme, displays as:
image

This would allow for queries like:

## Using GROUP BY
```dataview
TASK
WHERE status = "!"
GROUP BY file.link
```

## Using "visual"
```dataview
TASK
FLATTEN text + " (" + file.link + ")" as visual
WHERE status = "!"
```

These queries in my test vault displays like:

And now you can click on each line of text, and get directly back to where you wrote that mark. It does however require that extra line with just the task definition on it, but I kind of think it helps me focus on that bit as well. And when it’s not important any more, you could simply remove the line.

WOW. Thank you very much. It looks so nice. I will definitely use it. It is similar to the method I use but new options :wink:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.