Query variables to refresh on 'Refresh'

I have a dashboard ‘Query variable’, using an SQL query to read values from a table. The information in the table will sometimes change, and I would like the variable to change accordingly. Currently, the only options are for the variable to refresh on dashboard load or on time range change. The time range filter on this dashboard is not used as it is irrelevant, and I would like to be able to update the variable values without having to press F5 and refresh the entire browser window.

The helpful ‘Refresh’ button in the top-right of the screen can be used to refresh the dashboard panels both manually and at set intervals. Unfortunately, this does not refresh the query variables, and there is no option for it to refresh the query variables. Surely an option could be added to the ‘When to update the values of this variable’ dropdown so that it could be updated by a refresh?

At the moment, Grafana doesn’t provide a built-in option for this.

Query variables can currently be configured to refresh →

On dashboard load
On time range change

The dashboard Refresh button (and auto-refresh interval) refreshes panel queries, but it doesn’t re-run variable queries. So if the underlying table changes, the variable values won’t update until the dashboard is reloaded (or the time range changes, if you’ve selected that refresh mode).

Unless someone has found a datasource-specific workaround, I don’t believe Grafana currently supports refreshing query variables on every dashboard refresh.

If this would be useful for your workflow, I’d recommend opening or upvoting a feature request on the Grafana GitHub repository, since it would require a change in Grafana’s variable refresh behavior.