In this question
the accepted solution to include fields with special symbols in them is to use the row syntax. That doesn’t work for me when I have a brace: e.g.
rating (1-10):: 6
and then query
dataview
table row[“rating (1-10)”]
I just get “-”, as if the field doesn’t exist. What am I doing wrong?
And your spot on that the field do not exist with those. Using the test document below, you can see that neither rating nor rate is identified as fields. Hi there on the other hand is defined as a field in both its full form and the normalised form.
Test document used to check fields:
Testing some stuff
rating (1-10):: 6
More text and then [rate(1-10):: 7], and some more [Hi there:: 8]
```dataviewjs
let data = dv.current()
delete data.file
dv.paragraph(data)
```
I don’t really see this as a bug. In computer programming, there are special characters that can’t be used as variables, keys, fields, etc. In this case, parentheses seem to be problematic in field names. I’m actually impressed with how many characters are allowed to be used in field names.
I tried a couple more options. One uses escaped html, the other uses “emoji” brackets in place of regular parentheses. Neither seems like a great solution to me. I wasn’t ever able to figure out how to escape the parentheses in the Dataview query.
The following works for me…
Escaped html
[rating (1-10):: 6]
Emoji Brackets
[rating(1-10):: 7]
Query
```dataview
TABLE row["rating (1-10)"], row["rating(1-10)"]
WHERE contains(file.name,this.file.name)
OK, I changed my mind. I think this could be bug with inline fields. If I create a frontmatter property, which is different from an inline field, I can use a parenthesis in the property name. The below example works just fine.
Using the dataviewjs code @holroy suggested, I found there wasn’t any way to have the inline field recognized if a standard parenthesis was included in the field name. The issue isn’t escaping the characters in the query, the issue is the inline field is never created in the first place.
If this is something that bothers you, you could submit a bug report to the Dataview plugin GitHub.