Fields as Expressions
See original GitHub issueWhat happened?
According documentation, “if the field name has spaces, punctuation, or other non-letter/number characters, then you can refer to it using Dataview’s simplified name, which is all lower case with spaces replaced with “-”.”
If so, First field
becomes first-field
.
However, there is a difference between frontmatter and inline fields.
The rule declared in the documentation works only for inline fields, not for frontmatter fields. For these cases it’s seems necessary using this syntax:
row["First field"]
in DQL queriesthis["First field"]
in inline DQL- (for JS I don’t know)
DQL
Field in frontmatter
TABLE row["First field"]
FROM "folder"
=this["First field"]
Inline field
TABLE first-field
FROM "folder"
=this.first-field
JS
No response
Dataview Version
0.4.21
Obsidian Version
0.12.19
OS
MacOS
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Field Expressions
A field expression represents the value of a field. Create a field expression to change the value, datatype, scale, or precision of a...
Read more >Expression.Field Method (System.Linq.Expressions)
Field(Expression, FieldInfo). Creates a MemberExpression that represents accessing a field.
Read more >Defining computed fields with expressions
A computed field is a field that is appended to the open table and populated with the value of the specified expression.
Read more >Understand Formula Field's Expression
Fields are to be referred by their field link names. Expressions can include all types of field except add notes and section. A...
Read more >Calculate Field expressions—ArcGIS Pro | Documentation
The Calculate Field tool uses Arcade expressions to determine field values. You can perform simple and advanced calculations that are applied to all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, oversight on my part w.r.t. frontmatter. I forgot you could have spaces in keys and so I didn’t canonicalize them - I’ve fixed this for next release.
@s-blu I mean, is there a resource to read more on the
row
object?