Where to put tags in Dataview? YAML or BODY?

I claimed about informations, not ALL information. :slight_smile:

The first part I guess it is any js to create a table with a button… but I’m limited in js and I never tried Metaedit.

But going directly to your point… Tacking this simple example:

Total:: `=length(this.file.inlinks)`

What’s the value in the field Total::? What’s the value in the field Total::? When dataview parse this field it reads =length(this.file.inlinks), not the result of the inline query, i.e., it reads the inline query expression, not the rendered output of that query.

If you run a table query in a series page targeting the field Total, by “magic” dataview can run in first place the inline query in Total:: before run the table query that target that inline query (if you add more sub-levels it doesn’t work).
But this method have a problem: because the two queries run in the same page (don’t forget, the value in “Total” is the inline query, not the inline query result) “this” points to the current file, not each file where you have the inline query! I.e., in your table above length(this.file.inlinks) gives you the number of inlinks to the file “series.current”, not to each book file.

This is the problem related with the use of this (or dv.current()) in inline queries to work as field values.

How to avoid this? You need to be specific in the inline query, i.e., you need to replace “this” by the file.link. For example: instead of

Total:: `=length(this.file.inlinks)`

you need to place something like

Total:: `=length([[File Name]].file.inlinks)`

(to a more automatic process, maybe defining a Templater with the right expression to add the part to the query).

Another way… you don’t need to target Total:: or Read:: fields, you can construct them in the table query. I don’t know how to do it in JS, but taking this DQL as an example:

TABLE WITHOUT ID
     "![Cover|90](" + k.cover + ")" AS "Cover,
     file.link AS "Book", 
     length(filter(file.inlinks, (i) => contains(i.file.tags, "#🔰/✅read"))) + " of " + length(file.inlinks) AS "Books Read"
...