Use time range in template variable

Hi, I would like to define a template variable in a dashboard and set a specific time range which will be different from the dashboard template (elasticsearch data source). That’s because I want to have a dropdown list of values from an elastic index which is different from the one used in the dashboard, and I need to get all the values in there.

Looking at the documentation Elasticsearch template variables | Grafana documentation
it seems that it’s not possible. Any workaround?

I am using Grafana v.9.5.1.

hello @rastaxe

Please post a sample es doc? This might be accomplished using infinity plugin