XTK session write

Avatar

Avatar

shivaDT

Avatar

shivaDT

shivaDT

19-04-2016

Hi Team ,

could you please advise ,if there is something wrong with the below script ..

I have tried to use it and its not working ...

please suggest ..

xtk.session.Write(<enrich4
xtkschema="temp:enrich4" _key="@id" id={responder.@id} > <Product2
description={secondArray[1]}/> <Product3
description={secondArray[2]}/></enrich4>);

regards

shiva

View Entire Topic

Avatar

Avatar

srikanthr646926

Avatar

srikanthr646926

srikanthr646926

26-03-2018

Is it resolved? I am looking for a similar thing

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

logInfo("Schem name = " +schemaName);

var formatString = function(str) {
   
       blah blah blh......................

    return str;
}

var query = xtk.queryDef.create(
         <queryDef schema={vars.targetSchema} operation="select">
          <select>
            <node expr="@Label"/>
            <node expr="@FullName"/>
            <node expr="@lineNum"/>
          </select>
         </queryDef>);
  
var resultSet = query.ExecuteQuery();
for each (var row in resultSet.enrich5)
{
instance.vars.Label=formatString(row.@Label);
//logInfo(formatString(resultSet.enrich5.@Label));
xtk.session.Write(<query _operation="update" _key="@lineNum" Label= {formatString(row.@Label)}  xtkschema={vars.targetSchema}/>);

}