In text panel - mssql base - mode html - in javascript script - get all values of a variable query

Hello,

I’m trying to build a text panel to display a list of tabs with html.
I want this tabs to be created dynamically depending of the result of a query (in my case it’s a variable of type query, but maybe it’s not the best solution ?) : $myVar.
this is a possible result for my variable :
Preview of values
‘Bagger_01’, ‘Bagger_02’, ‘EmptyBoxes’, ‘FullBoxes’, ‘Line_01’, ‘MetalDetector_01’
I found how to get the current value of this variable, but I want to get in an array ? or anything else, all these values to make a loop.

Is there a way to do that ? Or maybe I’m not using the best way to perform this ?

Thanks in advance.

AFAIK text panel does not support queries and their handling :frowning:

Hum maybe I did not explain very well, it’s more about :
I have a variable defined in my dashboard of type query. I know I can get the current value in my html box, in my JS script like : var currentValue = ‘$myVar’. But what I need is to get all the possible values of this var.
Or maybe it’s a misunderstanding from me on how is funtionning a variable in grafana ? If I use myVar in html, does it means that I make a query in html ?

To get all the values of my variable without the option ‘all’ allowed I did create the exact same variable (hidden) with the option ‘all’ active…

I didn’t find a better way.

Thanks.