I am a recent Roam Research refugee, and I’m very pleased with Obsidian so far. But I’m running into an issue surfacing queries at the block level using multiple conditions and I could use some help or insight as to whether what I want to do is possible! I have been trying to use Dataview and the built-in Obsidian query builder.
Context
I primarily use this for work and I often use my daily notes page to make a number of notations as the day goes on that are not grouped under specific headings. An example of this within my daily note might look like:
2022-11-13
Notes and new tasks
I had a #meeting about [[Project X]]
-
Everyone had some pretty interesting things to say, but I want to hear more from Person A
-
[ ] Follow up with Person A to ask them some questions about [their proposal](external link) before our next meeting.
-
I let the group know I can’t make it to the presentation this Friday, and they will send me the slides later.
Scheduled a #meeting for [[Project Y]] for next month
- [ ] Write up an agenda and attach to meeting invite
Thinking back later, I made a flowchart to help me remember the process for [[Project X]] and it’s [here](external link) #resources
- [ ] Remember to go to the grocery store tomorrow and get peas
What I’m trying to do
On the page for [[Project X]], I would like to display results at the block level of queries of all files in my vault that a) have an outlink to the current page in the block and b) contain a particular tag in the block.
For instance, I could surface:
Meetings
I had a #meeting about [[Project X]]
Resources
Thinking back later, I made a flowchart to help me remember the process for [[Project X]] and it’s [here](external link) #resources
Things I have tried
I have searched the forum, subreddit, and GitHub issues list, but the answers I have found are either a) over a year old and possibly no longer accurate; b) not exactly attuned to this use case; or c) recommend implementing a complex dataview syntax that I cannot yet figure out how to extrapolate to my use case. I have also been able to implement the queries below, neither of which does all of the things I am trying for.
(Obsidian search)
tag: meeting
surfaces:
I had a #meeting about [[Project X]]
Scheduled a #meeting for [[Project Y]] for next month
…which is block level! Great! But does not filter out pages not linked to the current page.
(Dataview query)
TABLE FROM #meeting
WHERE contains(file.outlinks, this.file.link)
surfaces:
[[2022-11-13]]
… instead of the block-level content where the elements appear.
I know that block-level content is linkable, searchable and surfaceable (after all, the Linked mentions pane shows references at that level!) but I cannot work out how to embed that into a query, either with Obsidian’s search or what little I can yet understand about Dataview (I’d prefer not to have to dig TOO deep into it). Is this possible? What would the query need to look like? I appreciate any help you can offer!