- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hello @montezh2001,
I see two issues in your xtk.session.Write, the "vars.targetSchema" should be " {vars.targetSchema.split(':')[1]} ", and the identifier used to update your rows. As i understand from your request, the identifier of your temporary table is "clientId" and not "id", so your script should look like this :
var query = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@clientId"/> //or any identifier of the workflow's temporary table
<node expr="@contractIssueDate"/>
<node expr="@MMMYYYYDate"/>
</select>
</queryDef>);
var results = query.ExecuteQuery();
for each( var tmp in results){
var res = tmp.@contractIssueDate;
var Date1 = formatDate(res,"%B%Y").toString();
logInfo("MMMDate: "+Date1);
xtk.session.Write(<{vars.targetSchema.split(':')[1]} _operation="update" _key="@clientId" xtkschema={vars.targetSchema} clientId={tmp.@clientId} MMMYYYYDate={Date1}/>);
}Br,
Amine
Views
Replies
0 Likes
Total Likes