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