Data links: how to refer to table column with name dependent on current metric name

I’m developing a dashboard with non-predefined set of metrics.

| ts                            | obj                                  |
| Thu, 01 Jan 1970 03:25:45 GMT | { "metric1" : 1, "metric2" : 2 } |
| Thu, 01 Jan 1970 18:51:30 GMT | { "metric1" : 3, "metric3" : 4 } |

I use JSON transformation in Grafana to convert query data into table with the following columns and show it as a graph on Grafana.

ts, metric1, ... metricN

Let’s say that I want to add a link for every metric/value pair that says where this value originates from.

Now I have the following columns:

ts, metric1, metric1_link, ... metricN, metricN_link

The problem is that it is not clear how to add data link for metricN on a graph using value from metricN_link column.

Using ${__data.fields[${__field.name}_link]} doesn’t work, as it seems that Grafana doesn’t support evaluation of variable within variable. Are there other ways to create a link in this case? If not, then are there plans in roadmap to improve variables expansion in data links?

For example, another very valuable but missing functionality is to be able to set default value for variable if its value is not defined (say, ${__data.fields["column"]?"All"} to use “All” if “column” doesn’t exist).