Embed dataview-code-template, not the results of dataview-query in the source file

Hi guys,

I assume, that is a kind of advanced dataview-question… maybe, it’s even not a dataview-question, but a obsidian-core-development-question…

Here’s my problem:

I work on different projects. For every project I have a note, in which I protocol all my calls, meetings, mails, etc.
At the beginning of each project-note I have a dataview-query to have a quick overview of all todos and milestones in that project.
@scholarInTraining proposed that code here to me, I adjusted it a bit and it works pretty well.

Now here’s my question:

As I wrote, I have such dataview-query in each project-note. So if I want to change and optimize this dataview-query in each project-note, I have to copy and paste the new dataview-code into each project-note.
=> would it be possible, to have that code just once at one point in my vault, and just embed the code in my project-notes, so that the code of the embeded dataview-query runs in the embeded file, not in the source-file?

what I tried:

![[dataview-query for project-notes]] doesn’t work, because it just embeds the results of the query in the source-file “dataview-query for project-notes”.

what I want to achieve:

I’d like to tell obsidian, that this dataview-code should run in the file, where the code is embeded, not in the source-file.

Do you have an idea, how to achieve that?

Thanks in advance,
Silias

Hi @SiliasOS ,

I’ve run into a similar problem, wanting to embed the same Dataview query in multiple notes. I’ve detailed my findings, and a workaround, in the post below. I hope it’s helpful.

1 Like

Wow, that sounds interesting and is a good workaround!!! :slight_smile:
Thanks for sharing!