Inline metadata query on the same page for many blocks/sections

When you’ve defined your inline fields there is currently no way to ensure that they belong to the same entity as they’re defined in the page context. If however, you choose to make them into lists/tasks you can start working with them as separate entity through the usage of FLATTEN file.lists as item. See thread below for a similar example:

I say currently, because there are work being done on a plugin called Datacore, which is meant to be the successor of the Dataview plugin. But I’m not sure when (or if) it’ll be released to the general public. One of the goals of this new plugin is to add new contexts like blocks/paragraph, and so on.


I’m not entirely sure how I would format the list to display the information you’ve got, but here is one option with a suitable query:

- (desc:: Day 1)  
  [region:: Jardines Del Eden, Colombia]
  [variety:: Red Gesha]
  [processing:: Natural]
  [rating:: 3/5 👎]
- (desc:: Day 2)  
  [region:: La Colina, Guatemala]  
  [variety:: Caturra]  
  [processing:: Natural]  
  [rating:: 4/5 👍]  
- (desc:: Day 3)  
  [region:: Los Pirineos, El Salvador]  
  [variety:: Pacamara]  
  [processing:: Black Honey]  
  [rating:: 3/5 👎]

```dataview
TABLE WITHOUT ID item.desc, item.region, item.variety, item.processing, item.rating
WHERE file = this.file
FLATTEN file.lists as item
WHERE !item.parent
```

Where the latter part (“day 3” and the query) looks like:

Sadly, there is a bug in dataview currently which triggers some pecularities when it displays the original list item, so as the image shows it says that the last entry has the same values as “Day 3”, but still it displays the correct values in the table (and of course in source mode). Columns can of course be renamed, I just kept them as is to display how/where I found the values.

The various fields can also be styled using CSS to your liking.

(( An alternate setup using subtasks to contain the extra information is depicted in this reply on another similar case. I kind of don’t like that query myself (even if I’m the author), as it does a lot of list handling to get to the result. ))

1 Like