obsidian-dataview: Keys with spaces cannot be queried

Say I have a note “test” with these fields and values

---
Multiple words: yes
singleWord: yes
---

DQL cannot retrieve it:

```dataview
list where singleWord = "yes" 

(return the note "test)

list where ["Multiple words"] = "yes" 

(0 results)

However in the console I can still retrieve it:

app.plugins.plugins.dataview.api.page("test")["Multiple words"]
"yes"
  • Dataview Version: 0.4.22. Obsidian Version: 0.13.23. OS: Windows

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Fixed at some point in 0.5.22+ or later.

To avoid some interaction with other plugins, I created a new vault and install only the Dataview plugin for testing.

And the problem is the same, did I make any mistake?

raw:

---

date created: Thursday, April 28th 2022, 10:25:40 pm

---

- all
`=this`

- test kebab case
`=this.date-created`

- key-value
`=this["date created"]`

preview:

- all
file: path: test.md, folder: , name: test, link: [test](app://obsidian.md/test.md), outlinks: <empty list>, inlinks: <empty list>, etags: <empty list>, tags: <empty list>, aliases: <empty list>, tasks: <empty list>, ctime: 11:36 PM - April 30, 2022, cday: April 30, 2022, mtime: 11:39 PM - April 30, 2022, mday: April 30, 2022, size: 145, ext: md, date created: Thursday, April 28th 2022, 10:25:40 pm, position: start: line: 0, col: 0, offset: 0, end: line: 4, col: 3, offset: 62

- test kebab case
-

- key-value
Thursday, April 28th 2022, 10:25:40 pm

print screen: