Inline dataview query ( “-” as output)

I ran into the exact same problem as this post:

And despite following all the instructions, I can’t seem to get it working.

Given a Markdown YAML containing:

---
class: book
---

both these inline queries

`=this.file.class`
`=this.class`

output “-”. Both in reader mode and live preview.

I’ve also tried deactivating plug-ins, quitting, restarting, reopening obsidian, reactivating plugins, but no luck.

`=this.class`

this is the right query. But the point is: have you a valid yaml frontmatter? If any error in another field, all frontmatter is invalid…

1 Like

Thank you !
Was making a template, when in use it works :slight_smile:

Templates tend to mess up various like this, and it gets even worse when you build up dataview queries in a template.

So you need to check template output after they’re executed/inserted, and then ignore the errors when viewing the actual template source.

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