How to targetData from QueryDef alias?
Hi,
I'm attempting to display the result of the 'seasons' alias in a delivery using targetData. However the delivery fails due to 'targetData not defined'.
Please can you tell me how it's possible to do this?
The workflow appears as below:

The JavaScript logs the count correctly:

I there a specific way to target an alias from a queryDef in the delivery?
Many thanks,
Rob
JAVASCRIPT
var query = xtk.queryDef.create(
<queryDef schema="temp:query2" operation="select">
<select>
<node expr="Countdistinct(@email)" alias="seasons"/>
</select>
</queryDef>).ExecuteQuery();
var results = query.query2;
logInfo("Count: " +results.seasons);
DELIVERY
Seasons: <%= targetData.seasons %>





