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

Handling variables in grafana #403

Closed craftzneko closed 6 months ago

craftzneko commented 6 months ago

Please help, this is driving me crazy

When the plugin expands the variables what is actually doing. It seems like sometimes they behave like strings and other times like objects for example this creates an error "Invalid or unexpected token" its like its being interpolated into a string but not properly escaped

console.log($variablename)

I was storing JSON in a grafana variable and then reading it back in on another form panel but i gave up and instead used a global variable to use between two form panels

vitPinchuk commented 6 months ago

Hi @craftzneko it is necessary to add quotation marks to read the variable and not get an error

console.log(`$variablename`)