Closed bliu13 closed 3 weeks ago
@bliu13 You can use locationService
to set dashboard variables or to
and from
time range values.
Check out the blog for details: https://volkovlabs.io/blog/form-panel-use-variables-20240301/
Hi @mikhail-vl! I was able to set the Time Range picker, but I was wondering if it's possible to set QueryA
and QueryB
using the Reset Button? Sorry for the trouble. I've tried to test a specific number of keys, but for some reason I couldn't set the dashboard's variables.
@bliu13 Did you check the blog post? var-
in front of the variable is important to indicate that it's dashboard variable. Is it your issue?
if (context.element.id === "facility") {
context.grafana.locationService.partial({
"var-facility": context.element.value,
});
}
``
@mikhail-vl That was it! Thank you! I really appreciate you taking the time to point that out to me!
@bliu13 Glad we resolved it!
I am trying to see if the Business Forms plugin can be used to set or reset the Dashboard Variables and Time Range Picker values to specific values to the default. I am trying to use the Business Form's
Reset Button
functionality, but I don't see a way for me to set the variables and time range in thecontext
. The documentation seems to indicate that I can set the dashboard variables, but I don't know if that is possible with theReset Button
.I've attached an example dashboard configuration and a screenshot. example_reset_variables.json