I have started building an interface using Grafana 10.4.1 and I’m looking everywhere to solve the problem in the topic, but I have not found any solution. I have read many posts about it and they all refer to using chained variables with query variable. I just want to use custom variables.
The result I want to achieve can be of two types:
The first one could be get the value of a custom variable setting the key from another one.
This solution does not entirely solve my problem, because I need to keep as a key an explanatory label to be displayed in the menu, while the other pair of data would correspond to an ID and a value to be associated with it.
Am I wrong or this solution show both menus for variable 1 and variable 2?
I need to have something like this, a dropdown menu where i can select the element using the label and then i get the id and the relative value from another variable, but is not possible to associate 2 variables. I mean probably i need to use the chained variable but I could not find any examples using them with custom variables.
I generally need to use the CARS_PAIRS value and text but i need to select the cars from the CARS variable that rappresents the dropdown menu for the user.
Hello, is it possible to replace the selected number with a string in the JSON input? Something like this does not work for me:
{
“016” : [“word”],
“020” : [“sentence”]
}
For some reason only the following example Simple Queries · JSONata allows me to replace the number with a string:
[
{ “ref”: [ “top”,2 ] },
{ “ref”: [ “middle”,4 ] },
{ “ref”: [ “bottom”,5 ] }
]