Data Link ${__value.text} to Lowercase

Hi everybody, is there a way that i can user the ${__value.text} with an toLower that i generate an URL witch only have lower case?

How is the value list generated in the first place

What visualization are you using?

It is an influx Querry and i´m using the Table output.
So the Value Return with a String in the cell. At the moment i use the string with Override and Datalink. In the URL i have somthing like:${__value.text} but i need the "${__value.text} in lowercase

Hi @matzeeg3,
Here is a solution that worked for me:

First I created Flux query that converts letters to uppercase for each row by calling strings.toUpper inside map() function. I used last() to get only last values and group() so that I get all results in single frame/serie/table (in other words so that all data is shown in table without having to change frame).


import "strings"

from(bucket: "test")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "net_response")
  |> filter(fn: (r) => r["_field"] == "result_type")
  |> map(fn: (r) => ({ r with HOST_UPPER: strings.toUpper(v: }))
  |> keep(columns: ["_time", "_field", "_value", "host", "HOST_UPPER", "port"])
  |> last()
  |> group()

Then I set up an override that applies only to “HOST_UPPER” column and set Data link

Grafana override

Data link:${__data.fields.HOST_UPPER}

In URL you can see that string is shown in uppercase.

Tested on:
Grafana 9.3.2
InfluxDB 2.6.1 Flux language

Best regards,