Is it possible to pass dataviewjs parameter in a link?

What I’m trying to do

I’m trying to see if it is possible to have a note that has a dataviewjs code that depends on a parameter that is passed to the note by the link.

use case: I have a heatmap calendar template that I use to track different tasks. right now I’m just creating a bunch of notes like this:

task: Do something

text = dv.current().file.frontmatter.task
await dv.view('_/js/daily-note-heatmap-calendar', {text: text, container: this.container})

for different tasks. What I would like to have instead is just have one note that reads “task” parameter from the link rather than frontmatter. and then have a bunch of links to it with different parameter values rather than having to create notes for each parameter value.

basically instead of

have something like

Things I have tried

Tried searching forums, but rather new to Obsidian and it’s plugins so not sure if I’m using the wrong search terms or if it’s just not possible to do this in Obsidian

Thank you!

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