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

**URL:** <https://forum.obsidian.md/t/how-do-i-query-headings-containing-a-particular-inline-tag-in-a-folder/37362>\
**Category:** Help\
**Tags:** dataview\
**Created:** [May 11, 2022, 11:00pm UTC](https://forum.obsidian.md/t/how-do-i-query-headings-containing-a-particular-inline-tag-in-a-folder/37362 "2022-05-11T23:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kohane27](https://forum.obsidian.md/user_avatar/forum.obsidian.md/kohane27/32/28106_2.png) [@kohane27](https://forum.obsidian.md/u/kohane27)\
**Post date:** [May 11, 2022, 11:00pm UTC](https://forum.obsidian.md/t/how-do-i-query-headings-containing-a-particular-inline-tag-in-a-folder/37362/1 "2022-05-11T23:00:00Z")

</div>

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:

```nohighlight
.
├── Nudge.md
├── The Cancer Code.md
└── Why Buddhism Is True.md

```

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

```nohighlight
---
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
finished:: 

```

```nohighlight
---
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
finished:: 

```

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:

 ![screenshot-2022-05-12-06-38-51](https://forum.obsidian.md/uploads/default/original/3X/3/9/394851c04069f57416ec6ff6fd1ed383039a1d87.png)

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

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

```nohighlight
TABLE WITHOUT ID file.link as Book,
chapter AS "Chapter"
FROM "Books" and -"Books/00. MOC Books"
SORT file.name ASC
FLATTEN Book

```

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!

---

<div class="post-metadata">

**Author:** ![kohane27](https://forum.obsidian.md/user_avatar/forum.obsidian.md/kohane27/32/28106_2.png) [@kohane27](https://forum.obsidian.md/u/kohane27)\
**Post date:** [May 19, 2022, 6:47am UTC](https://forum.obsidian.md/t/how-do-i-query-headings-containing-a-particular-inline-tag-in-a-folder/37362/2 "2022-05-19T06:47:35Z")

</div>

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](https://forum.obsidian.md/t/create-progress-bars-by-counting-number-of-yaml-fields/36048) by creating a chapter per md file with YAML data inside.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [August 17, 2022, 6:48am UTC](https://forum.obsidian.md/t/how-do-i-query-headings-containing-a-particular-inline-tag-in-a-folder/37362/3 "2022-08-17T06:48:29Z")

</div>

Closed on August 17, 2022, 6:48am UTC

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