How do I query headings containing a particular inline tag in a folder?

Hello guys! Thank you for checking out my thread. I appreciate it.

I’m trying to create a book tracker. Here’s my book directory structure:

├── The Cancer
└── Why Buddhism Is

For each markdown file, the structure is the same. Examples:

title: "Why Buddhism Is True"
author: [[Robert Wright]]

### chapter:: 1 Taking the red pill
status:: read
started:: 2022-04-05
finished:: 2022-04-06

### chapter:: 2 Paradoxes of meditation
status:: reading
started:: 2022-05-11
title: "The Cancer Code"
author: [[Jason Fung]]

### chapter:: 1 Trench Warfare
status:: read
started:: 2022-02-10
finished:: 2022-03-20

### chapter:: 2 The History of Cancer
status:: reading
started:: 2022-05-11

Then for my “MOC Books”, I’m trying to query chapters of books I’m currently reading.

So given the structure and examples above, the result would be the following:

This is because both of them contain status:: reading.

The following is the rough dataview structure that I could think of:

chapter AS "Chapter"
FROM "Books" and -"Books/00. MOC Books"

The crux of the problem is that I can’t add WHERE status = "reading" since it targets the whole file, not any one particular inline field.

I understand that I could create one file for each chapter, and then query each file’s YAML for status = "reading", but that doesn’t quite suit my workflow, because I want to track everything about a book in one file. I’m open to modifying the md structure in order to achieve this result.

Any help is much appreciated. Thank you again!

If anyone is here for the solution, sadly I couldn’t figure it out. I’ve resorted back to using Create progress bars by counting number of YAML fields by creating a chapter per md file with YAML data inside.

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