You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that whenever metadata is calculated inline queries leveraging this (DQL) or dv.current() (DVJS - either directly or through code supplied through dv.view) aren't bound to the original page's context.
Based on the docs and previous discussion, it seems like this is expected to (and used to!) at least work when the inline query used as a view and/or the main query used JS.
However, with #170 still open, maybe it actually isn't expected to work at all? It definitely makes sense that the implementation might be difficult and not necessarily worth either the effort or potential performance hit. I'm happy to submit a quick PR updating the docs based on this assumption!
DQL
No response
JS
Dataview Version
0.5.67
Obsidian Version
1.7.7
OS
MacOS
The text was updated successfully, but these errors were encountered:
When you use code like that, you don't set the inline field to the result value of the query, but rather to the actual query it self. This means if you later on try to get the inline field value, you'll get the query instead, and it's evaluated in the local context, which may or may not work.
This is not a bug, but more of a feature on how the inline fields have been implemented when you use them in combinations with inline queries. So it's not to be expected to work, unless the query make sense in every context you evaluate it.
So for example you could potentially use something:: `= [[foo]].anotherValue` since that would have a global value.
What happened?
It seems that whenever metadata is calculated inline queries leveraging
this
(DQL) ordv.current()
(DVJS - either directly or through code supplied throughdv.view
) aren't bound to the original page's context.For example, given:
The file with the main queries will render as:
Based on the docs and previous discussion, it seems like this is expected to (and used to!) at least work when the inline query used as a view and/or the main query used JS.
However, with #170 still open, maybe it actually isn't expected to work at all? It definitely makes sense that the implementation might be difficult and not necessarily worth either the effort or potential performance hit. I'm happy to submit a quick PR updating the docs based on this assumption!
DQL
No response
JS
Dataview Version
0.5.67
Obsidian Version
1.7.7
OS
MacOS
The text was updated successfully, but these errors were encountered: