Variabels and repeater section

Hi! I have an issue i need som input on from someone. So on beforehand, thanks for any guidance im given :slight_smile:

Im using panel repeating to show data on uniqe MQTT topics that exists of spesific types.
Using the repeater itself works like a charm on whole topics.
This is my MQTT topic: “OC1/DATA/VAR/VAL/PQLPXK/ProcessingLines/LineA/GCR” and it works in the repeater.

My issue seems to be this:
Im trying to find a way to merge this string"OC1/DATA/VAR/VAL" with each selectable variable containing this format “/PQLPXK/ProcessingLines/LineA/GCR”. The output should then be used in the repeater.

This is done so that i can use this partial topic to select machine: “/PQLPXK/ProcessingLines/LineA/GCR”, and this partial topic to select data format to be presented in the spesific panels : “OC1/DATA/VAR/VAL”.

How do i solve this?

I do not think it is possible in Grafana to merge a string with a selected variable (at least I have never seen it done).

Thanks for taking time to answer me @grant2 , i appreciate it :slight_smile:

I found a way to do it thru use of variables.
Here si a copy of the code i used if anyone else is interested:

(data->>‘value’)::Numeric AS DetectedSpeedPrMin
topic IN (
(SELECT unnest(string_to_array(${topic_line}, ‘,’)::text) as topic) subquery
AND data ->>‘name’=‘FishDetectedPrMin’
AND time > $__timeFrom()
AND time < $__timeTo();

It gave me the ability to spesify a LineA, and then add he machinery(example GCR) tot he Row repeater. It aslo game me the ability to spesify the first section of the MQTT topic so that i could fetch the different data types on each machine.