VolkovLabs / business-forms

The Business Forms panel is a conceptually new plugin for Grafana. It is the first plugin that allows inserting and updating application data, as well as modifying configuration directly from your Grafana dashboard.
https://docs.volkovlabs.io
Apache License 2.0
86 stars 10 forks source link

Dynamic form via SQL query #416

Closed abrahammarco7 closed 5 months ago

abrahammarco7 commented 5 months ago

Hello, the question is if there is a possibility of inserting the content of the value field of the user's selection of a form element, as a variable within a query. It would be a simple way to make the form more dynamic. I haven't seen anything like this in the documentation, could someone help me? Below I add an image to make it look clearer, in the image I want to replace the date that I have in the query with the one that the user selects in the "Sample moment" field Thank you.

image

mikhail-vl commented 5 months ago

@abrahammarco7 You can use form elements to update Dashboard variables as we explained in the blog post: https://volkovlabs.io/blog/form-panel-use-variables-20240301/.

Dashboard variables can be used in the Query to help you with dynamic forms.

We recently published multiple blog post explaining dynamic forms and various solutions: https://volkovlabs.io/blog/tags/data-manipulation/.