


Hi Everyone,
I am trying to write a queryDef code where in I want to filter the records based on the internalName of the previously executed delivery dynamically. Something like below-
var query=xtk.queryDef.create(
<queryDef schema="nms:delivery" operation="select"/>
<select>
<node expr="@id"/>
</select>
<where>
<condition expr="@internalName='DM123456' "/>
</where>
</queryDef>.ExecuteQuery();
In the above code the "DM123456" i want it to dynamic to an instance/event variable which i can create before.
Can someone please help, it will be great if it's possible.
Whatever solutions can be provided is highly appreciated.
Thanks,
Akash
Views
Replies
Sign in to like this content
Total Likes
I found the solution myself-
so for using event variable the syntax is below-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+vars.internalName+"'"}/>
for instance variable-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+instance.vars.internalName+"'"}/>
for a user defined variable, let's say var internalName-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+internalName+"'"}/>.
I found the solution myself-
so for using event variable the syntax is below-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+vars.internalName+"'"}/>
for instance variable-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+instance.vars.internalName+"'"}/>
for a user defined variable, let's say var internalName-
<condition boolOperator="AND" expr={"[delivery/@internalName] = '"+internalName+"'"}/>.