How to update data in tables Using Java Script?
I have to update the data which is already available in custom schema using API. For that I am using Below java script snippet.
Workflow is Running without any error. But The data is not updated in tables. Please help me to solve this.
var query = xtk.queryDef.create(
<queryDef schema= "temp:fileImport" operation="select">
<select>
<node expr="firstName"/>
<node expr="lastName"/>
<node expr="email"/>
<node expr="city"/>
</select>
</queryDef>)
var results = query.ExecuteQuery();
for each ( var record in results.fileImport) {
logInfo("record --"+record.firstName);
xtk.session.Write(<query xtkschema="ram:customer" _operation="update" _key="@firstName" city = {record.city} firstName={record.firstName} />);
}
Regards,
Ramprakash.