Avatar

Correct answer by
Employee Advisor

tumuzhuanjia

This is possible, by reading the temporary table created to hold the query data. (https://db.tt/aiCRLu3a66 )

  1. Add a Query and target recipient table
    •     Add complementary data (this is what you can use to query in the js activity and do stuff with it) https://db.tt/Ps2IRqkyil
  1. Add Js Activity with the following code and execute the workflow.

var schemaName = vars.targetSchema.substr(vars.targetSchema.indexOf(":") + 1);

var query = xtk.queryDef.create(

  <queryDef schema={vars.targetSchema} operation="select">

    <select>

      <node expr="@email"/>

    </select>

  </queryDef>

);

result = query.ExecuteQuery();

for each (var e in result) {

logInfo(e.@email);

}

View solution in original post