Is there a way to use the grafana variables within the function/queries using grafana.q?
For example in Grafana you can add a template variable to the dashboard. Then you can use that in your queries by precedding with $.
So for example I added a Date variable

then you can reference that variable with $Date in the function/query. So you can have something like
I had to change line 83 in grafana.q to
rqt:ssr[raze rqt[`targets]`target;"\\";""];
because for some reason the var is getting down to grafana.q with \\, but there may be a better place to do that.
I can't however get the template variables to work with a query, it wont pull them properly.