Expand my Community achievements bar.

SOLVED

Script from Query

Avatar

Level 1

Hi experts,

I am stuck while writing where condition in script activity of a web application. Below is the actual query of say 'xyz' schema. 

Shaktiraj_D_0-1744211501409.png

Help me completing the where condition.
NLWS.xtkQueryDef.create({ 
queryDef: {
schema: "sam:xyz",
operation: "select",
select: {
something... something....
}
where: {
condition:
[{
expr: "@label='" + dlabel + "'"
}, ??????????
]
}
}

Also, please suggest me if any good documentation from where I can learn such different different queries writing in script.

Thanks and Regards,
Shaktiraj Daudra

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Shaktiraj_D ,

Try the below script,

var query = xtk.queryDef.create(
<queryDef schema="sam:xyz" operation="select">
<select>
<node expr="@label"/>
<node expr="[workflow/@internalName]"/>
</select>
<where>
<condition expr="@label = '111' and [workflow/@internalName] !=''"/>
</where>
</queryDef>
);

Documentation - https://experienceleague.adobe.com/en/docs/campaign-classic/using/configuring-campaign-classic/api/d... 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Shaktiraj_D ,

Try the below script,

var query = xtk.queryDef.create(
<queryDef schema="sam:xyz" operation="select">
<select>
<node expr="@label"/>
<node expr="[workflow/@internalName]"/>
</select>
<where>
<condition expr="@label = '111' and [workflow/@internalName] !=''"/>
</where>
</queryDef>
);

Documentation - https://experienceleague.adobe.com/en/docs/campaign-classic/using/configuring-campaign-classic/api/d...