Custom variable key:value can you reference just the key in a query

I have a custom variable called STG which contains the following:

ENV1 : 1_1_1_1, ENV2 : 1_1_1_2

This works as intended in most of my queries, however, in one of my queries, I only want to reference the key name (ENV1 or ENV2) only. I have tried:

I’ve also tried region=~“${STG}” but no luck

Interestingly, if I put $STG into the panel title, it will show the selected key.

You can use ${STG:value} and ${STG:text} to get value/key of selected key-value variable.


Thanks, that works perfectly.