Custom Query Variable on Elasticsearch Datasource

Hi there community,
Hope you’re all well and safe.

I’m using an elasticsearch datasource.
Works great.

I’m trying to make a dropdown selection at the top of a dashboard that matches specific queries to apply on the entire dashboard.

For example, I want a dropdown selection called “Hardware”, with several possible selections like:
Hardware :
Board1
Board2
Board3

These selections need to invoke specific queries, like :

Board1 corresponding to the query : hardware:1

But Board2 corresponding to the query : hardware:2 AND NOT id:aa*

So I gathered I should use a variable of the “Custom” type.
I’ve tried many different syntaxes with no success.
Such as for example, in the custom type variable’s custom options field :

Board1 : ${hardware:1}, Board2 : ${hardware:2 AND NOT id:aa*}

Questions

  1. Is the “Custom” type variable the appropiate method for my use case ? (Or worse is my use case achievable on an elasticsearch datasource?)
  2. Is the syntax correct ?
  3. Would I need to include this in the dashboard’s panels ? And if yes how (because the query has potentially more than one parameter : because of Board2 query, I couldn’t possibly place hardware:$hardware…)?

Thank you for any support here, which would be immensely appreciated.

Kind regards.

gentle bump !
(with twenty characters)

Hi there community, still eager to solve this one…
Any suggestions ?