Refresh note

Button to refresh/reload note, make it automatic OR by a shotcurt/button

Does the command “Reload app without saving” do what you want?

Why do you want it to refresh? Is it depending on some queries? If so what kind of queries?

Doing the reload app refreshes the entire app (and all windows), but there are a few other alternatives for a given window:

  • close and reopen the note
  • browse back and forth in page navigation/history
  • change edit mode (works in some cases)
  • if dataview is installed, trigger the Dataview: Refresh current view command

If we’re talking dataview queries it’ll refresh automatically when/if it detects changes it deems related to the query. It’ll also always refresh if the query changes, even with as little as the addition/removal of a whitespace character.

1 Like

It’s not suitable, I need something that makes my queries update automatically or with a button, at the moment it only works if I close and open the note

What about mapping a keyboard shortcut to “Dataview: Force refresh all views and blocks” or “Rebuild current view”?

I need to do this all the time. I have dataview set to only evaluate once on open. To refresh it, I have the following templater code in a template, which I trigger with a hotkey:
<%*app.workspace.activeLeaf.rebuildView()%>

I even have it bound on my mouse for easy access!

It was needed to do it like that before, but I do believe using the Dataview: Refresh current view is the better option nowadays as it does a little error checking around the call before refreshing.

But the OP hasn’t yet responded as to why they want to refresh the note, so we’re left in the dark of this is the better option for they.

o, how did I miss that one? I’ll give it a shot. Thanks as always!