Organize fields transformation resets after changing variables

Hi Experts,

I am using InfluxDB 2.1.1, and Grafana v8.3.2 (afb9e8e5f). The connection is set up with Flux. I want to display basic system logs from a bucket.
I have a few variables set on the dashboard and the query for the a table view is set up like this:

from(bucket: "log")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "accesslog")
  |> filter(fn: (r) => r["result"] =~ /^${result:regex}$/)
  |> filter(fn: (r) => r["name"] =~ /^${name:regex}$/)
  |> filter(fn: (r) => r["type"] =~ /^${type:regex}$/)
  |> group(columns: ["_measurement"])  
  |> drop(columns: ["_field"])
  |> sort(columns: ["_time"], desc: true) 

I use “Organize fields” transformation to rearrange and rename the fields. And everything is working just fine as expected:

But if I make any change to the variables, the table updates, but the columns reset:

I am guessing the query contains less tables in the response hence the view thinks this is a different structure and the field settings no longer apply. But in my case it is always the same. I even added a Merge hoping that it will “flatten” the tables, but it does not help.

Is it possible to “fix” the transform not allow it to be changed? Or any other way to archive the same result?

Regards,
Csongor

I realized, I should have used the Overrides and not the Organize Fields transformation. But correct me if I am wrong.

But it looks like the Overrides still ignores me the order I maintain the fields. And if I only use Organize Fields to set the column order, that still resets after each time range change.