Compile codeblocks (dataview) from preview mode

Things I have tried

What I’m trying to do

Hi community,

I am using a combination of the Buttons, MetaEdit & Dataview plugins to create a dynamicly generated result table from a collection of notes in preview mode only (no need for editing) which works wonderfully apart from one thing!

In short, the workflow is:
Buttons triggers MetaEdit > MetaEdit enables me to update 2 frontmatter parameters QueryKey & QueryValue > those 2 variables are fed within a Dataview query to retrieve relevant data.

Each step works wonderfully separately BUT being in preview only, the workflow breaks at the end as the Dataview table does not update itself upon receiving the new parameters.

EDIT: manually toggling to edit & back to preview works but is not a long term solution.

Is there a way to force a note to recalculate codeblocks from the preview mode?

Many thanks in advance

I’ve seen similar issues with another plugin, textexpander, were you have to navigate away and back to get the code to update after a change.

The only thing I can think of is the Obsidan API. There might be a command to force a note update on a change. Maybe post a question to a thread here on the API.

API commands

It seems that Dataview actually refreshes automatically. I had to reload plugins by closing and re-opening Obsidian. Perhaps that would/could fix your issue with textexpander?
I am having similar refresh issues with ‘Itinerary’ now and need to look into it. I may look at the API file…

1 Like

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