Script from Query | Community
Skip to main content
Shaktiraj_D
April 9, 2025
Solved

Script from Query

  • April 9, 2025
  • 1 reply
  • 446 views

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. 

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

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/data-oriented-apis 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
April 9, 2025

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/data-oriented-apis 

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups