Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Text of selected template variable in Grafana

Grafana version 7.3.3. I have a Custom variable created on top of JSON Datasource. Below payload I used to populate the variable options $Project [{"text": "Proj1", "value": "1"}, {"text": "Proj2", "value": "2"}].

Now for the templating query I want to use text of selected $Project dropdown . For e.g. fields.Project:$Project.__text something like this . But I am only getting the value of selected variable $Project not the text.
Is there is a way to get it .

like image 955
curiousguy Avatar asked Sep 01 '25 20:09

curiousguy


1 Answers

I have found a solution:

${variable_name:text}
like image 190
ВАСЯ ВОРОН Avatar answered Sep 05 '25 07:09

ВАСЯ ВОРОН