Alerting on Prometheus Data Tick Script HELP

I want to Alert on Prometheus data. I have it working and alerting on a specific Value except I’m not sure how I access the prometheus “Fields” in the Element field in prometheus. I tried just spitting out the entire element using {{ index .Tags “element” }} but it doesnt work. I’m assuming this is wrong. Can’t really find much documentation about this. Tick Script I am using is below.

var warn = 1
var period = 30s
var every = 10s

// Dataframe
var data = stream

// Thresholds
var alert = data
        .id('{{ index .Tags "element"}}')
        .message('Deployment Alert - The Following Deployment has less than 1 Replica Available: {{ index .Tags "element" }}')
        .warn(lambda: "value" < warn)

// Alert

Did the answer you got in the #influxdb Slack channel answer this question for you?