Using 'position' as a key in YAML does not work with Dataview

Hey, there’s an issue where using ‘position’ as a key in YAML metadata does not work with Dataview. The query ‘where position’ will show no results. If I rename the key to something else, the query works as expected.
Also, using ‘position’ as an inline-key works without problems, so the issue is bound to yaml.
This seems to only happen with the specific key name ‘position’. However, lastly I’ve had another issue with keys named ‘location’, so I suspect there may be some internally reserved terms that don’t work properly with Dataview… could that be? Haven’t found any documentation indicating this though.
No other plugins are involved, deactivated all. you can easily reproduce that behaviour.
Can you please look into this issue and confirm if certain key names are incompatible with Dataview for YAML metadata? Thanks a lot!

Does it work to use row["position"]? See Expressions - Dataview for more examples.

In which context are you using this, is within lists or similar where there is already defined a position for some of the contexts?

neither where position nor where row["position"] nor where contains(position, "xyz") shows results when “position” is set in yaml. inline all queries work.
this is the yaml.
enclosing the value in quotes or brackets makes no difference.

This was a rather strange case, but I can confirm that using “position” as a property name, somehow is ignored by dataview. And there was raised an issue on it 16 days ago (or so): No value (-) shown by Dataview when asked to display the value of a custom property · Issue #2106 · blacksmithgu/obsidian-dataview · GitHub

Both my own, and within the issue (I saw later), can see that doing it as inline field works as expected, but not all lowercase as a property.

So you’ve got two workaround whilst the issue is being resolved:

  1. Move it to be an inline field
  2. Change the casing, as Position seems to work as intended

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