Hi Valentin,
- Create an option under Administration > Platform > Options by the name of your choice say "MyWkfCount" and type text.
- Add a JS activity right after the activity which is supposed to give your record count.
- Keep this line of code setOption("MyWkfCount", vars.recCount);
For the List variables, best will be to use an array.
From the schema tab of query activity you can get the schema name, probably it will be temp:query
You can then use this code
var query = xtk.queryDef.create(
<queryDef schema="temp:query" operation="select">
<select>
<node expr="@use"/>
<node expr="@label"/>
<node expr="@[D_1]"/>
<node expr="@[D_2]"/>
<node expr="@[D_3]"/>
<node expr="@[D_4]"/>
<node expr="@[D_5]"/>
</select>
</queryDef>);
var results = query.ExecuteQuery();
var data= [];
for each (var result in results) {
data[0] = result.@use;
data[0] = result.@label;
data[0] = result.@[D_1];
data[0] = result.@[D_2];
data[0] = result.@[D_3];
data[0] = result.@[D_4];
data[0] = result.@[D_5];
}