Hello community,
I am trying to include the values of a temporal schema of a workflow in an alert node according to the following Adobe link but it is not working.
First, I have created a javascript node with this code:
var query = xtk.queryDef.create(
<queryDef schema="temp:query2" operation="select">
<select>
<node expr="@label"/>
<node expr="@countField"/>
</select>
</queryDef>
);
instance.vars.items = query.ExecuteQuery();
Secondly, I include an alert node with this code:
Views
Replies
Total Likes
Hi @LAR1985 ,
Write this JS in source tab in Alert activity. Or have a JavaScript activity before Alert activity, Perform queryDef in JS and store the results in a variable. And in alert activity call these variables.
Hi @LAR1985 ,
Write below JS to fetch the data from your temp table.
var sql = "SELECT D0.sLabel,D0.sName, D0.sFullName FROM " + vars.tableName + " D0 ";
var qrDeliveryData = sqlSelect("resSQLResult, @label:string, @name:string, @fullName:string ",sql);
vars.deliveryDataTable = '<TABLE BORDER="1"><TR><TH>Label</TH><TH>Internal Name</TH><TH>Folder</TH></TR>';
for each (var resSQLResult in qrDeliveryData) {
vars.deliveryDataTable += "<TR><TD>"+resSQLResult.@label+"</TD><TD>"+resSQLResult.@name+"</TD><TD>"+resSQLResult.@fullName+"</TD></TR>";
}
vars.deliveryDataTable += "</TABLE>";And then in your Alert activity, just write:
<%=instance.vars.deliveryDataTable%>
Thanks,
Jyoti
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies