Dataviewjs Question

Is it possible to use the YAML Frontmatter TAGS of the page that has your Dataviewjs query for the WHERE clause query?


Wouldn’t it be a little cruel to end the post there? Let’s take it one step further.

In inline dataviewjs queries, you can use this.fieldName, and in normal dataviewjs it’s a little longer and you can use dv.current().fieldName.

Note this is reading the values, and you can’t change them using these names.

Awsome is there a document somewhere that has the arguments you can use like this etc. I did not see that in the documentation. Conversely the same for Dataview JS? This worked like a champ by the way,.

I guess this is the best starter for stuff like this and dv.current(), but the documentation site does hold some gems here and there.

So you just need to be wary of which section you’re in, whether you’re looking at the DQL query stuff (aka TABLE ... and LIST ... and so on), or more of the dataviewjs/javascript stuff, as they’ve got different methods of doing the same.

(One neat little trick, though, is to use dv.func.SOMETHING where SOMETHING is a DQL query function, with its cons and pros. I sometimes use the DQL functions out of simplicity and convenience (and a little bit of laziness) )