Grafana variables in datalinks

I I m having a grafana instance where all the products in a namespace are listed. There are datalinks to logs and to the product configured. The context root of the product is saved as a label in the pod. How do i use the label as a variable in datalinks.

I have tried setting a variable, but the variable is dependent on two other variables, and one of them is not available when variable context root is used.

Variable definition :

label_values(kube_pod_labels{namespace="awl-${umgebung}", label_group="awl", label_type="as",label_product="${product}"}, label_context_root)

Variable definition

Then I m using the datalink, https://xyz.xom/${umgebung}/${context_root}/ . The var umgebung is available as it is always selected to display the products from one particular environment. But the var $product is not selected and so $context_root doesnt know what to return. How can edit the variable context_root to use the label_product.

The metrics used in the field (label_replace(sum by (label_product) (kube_pod_labels{namespace="awl-${umgebung}", label_group="awl", label_product="${product}"}), "toshow", " $1 - AS ", "label_product", "(.*)"))

What other possibilites exist for me to provide the product URL which is created from the context root saved in the labels of the pods

helo what grafana version are you using

i m using version v7.1.1 (it is a community operator from the redhat openshift operátor)

and can you try another version

Unfortunaltey not. But i found a way out with the datalinks and using grafana variables