Things I have tried
referring to : Reference dataview table - #7 by Saorsa
I want the same query to use in multiples files and place in only one place to easily made future changes…
so my frontmatter of the file, where I want to embed the including file (with the dataview query) looks like:
the inline js query in this file further down is:
the file with the query (dv_incl_file.md) has the code:
key1, key2, due-date
WHERE type = "action"
AND project =this.project
but all I get in the file, where I call the included file(dv) is:
where did I wrong…?
Can you provide two or three sample notes to test?
I would suggest looking into
dv.view(), which in addition to hiding/containing your dataview code, also can accept parameters to tweek your queries.
One of my use cases for such a query is to build a navigation header for my (seldomly) daily journal notes, based on existence of entries. And with this function, I only have a single line within my daily journal notes.
Thanks for your replay.
i did another try with more simple data/notes:
TABLE dat-beg, dat-end
WHERE type = "action" AND project = this.file.link
SORT state ASC, dat-beg DESC
but all I get is:
mnvwvnm already gave me advise…
I set up a new vault only with dataview-plugin → also negative.
Obsidian Version v1.1.8,
(mnvwvnm has v1.0.3 and it works for him… )
I found this thread: Dataview: reuse DQL queries?
but I dont get through.
i tried to change the call of dv to
also renamed the file to
is it a bug possibly?
I tried it on a Samsung S7+ tablet with Obsidian v1.41 (API v1.03) also only dataview plugin installed:
I hate to say this again… but never discuss a possible “bug” or debug things in Live Preview!
I hate LP!!!
Change the render to the Reading view!
Because inline queries in LP are buggy!
If you like to use LP, then it’s better use a codeblock:
bang → works.
but I should have thought of that too… but it doesnt seem so…
it’s high time for me to take a break
thanks to your efforts, and don’t let spoil your mood because of my stupidness
have a nice Christmas all together
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.