Chained variable in dashboard(Grafana 8)

I am attempting to use a chained variable for a dashboard (Grafana 8.1) pulling the data from InfluxDB 2 using FLUX. I know this is the older way to write a chained query.
SHOW TAG VALUES FROM “cpu” WITH KEY = “cpu” WHERE host =~ /$server/
I know how to create a non-chained query for cpu.
import “influxdata/influxdb/schema”
schema.tagValues(
bucket: “Development”,
tag: “cpu”,
predicate: (r) => true,
start: -90d
)
How do I modify my query so that is only looks at the cpu for the host I have already selected?

Hi , you can use the predicate attribute for that, for example:
predicate: (r) => r.host == "${server}"
or something similar….