Dataview query links


I am new to Obsidian and I’m a little stuck.

I want to be able to create tasks and then have them at my fingertips when I talk with someone. Ideally I would have some simple meeting notes:

    XYZ Meeting
    participants:: [[Maria Gonzales]] [[Bill Jones]]
    [ ] Task I need to do #todo/for [[Maria Gonzales]] [[Bill Jones]]
    [ ] Task I need someone else to do #todo/from [[Bill Jones]]

Then when I meet with Bill, I was hoping to have two dataviews, one for tasks I owe him and one for tasks he owes me.

I wrote the below query for my Person Template, hoping it would return the todos/for bill when applied to the [[Bill Jones]] page/file:

FROM [[<% tp.file.title %>]]
WHERE contains(tags, "#todo/for")

But this returns all #todo/for items on the page (presumably because Maria and Bill were participants in the meeting). (Is there a way to query dataview at the block level for links, like I can with tags? That seems a critical difference between tags and links, at least for dataview.)

I have also thought of making #Bill_Jones as a tag - and that works… but it is awkward; I then have a page named [[Bill Jones]] and a tag named #Bill_Jones.

Is there a better way to do this?



P.S. If anyone wants to follow the [[Bill Jones]] and #Bill_Jones method, this works for the template, creating the #Bill_Jones tag within the query for the [[Bill Jones]] page/file:

  WHERE contains(tags, "#todo/for")
  AND contains(tags, replace("#<% tp.file.title %>", " ", "_"))

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