Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Query Subject Line using querydef

Avatar

Avatar
Level 1
acdbm
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
acdbm
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
acdbm
Level 1

06-01-2021

Hello,

I am trying to query the BroadLog for a specific subject line using querdef. What should the javascript code/query look like? The field I am trying to query is located here:

nms:broadLogRcp/delivery/mailParameters/subject 

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile
Adhiyan
Employee

27-01-2021

Hello ,

Can you please take a look at 

https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic/export-subject-or-in-general...

 

There are certain limitations while working with xml fields in QueryDef and loading the data of the subject into the variable could be a limitation.

 

--
Adhiyan

Avatar

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

128 likes

Total Posts

144 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

128 likes

Total Posts

144 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile
kapilKochar
MVP

06-01-2021

<queryDef operation="select" schema="nms:broadLogRcp"  xtkschema="xtk:queryDef">
<select>
<node expr="[delivery/mailParameters/subject]"
label="Subject (Delivery/Email header parameters)"/>
</select>

<sysFilter>
<condition>fill the condition you want</condition>
</sysFilter>
</queryDef>

acdbm

Thanks. And then how do I view the results? Right now, in the journal it says:

Activity 'js': Transition 'done': The target activity is not specified

Sukrity_Wadhwa
Hi @kapilKochar, Can you please help @acdbm further with their query? Thanks!
kapilKochar

Hi ,

 

var queryDemo = xtk.queryDef.create(

<queryDef operation="select" schema="nms:broadLogRcp" xtkschema="xtk:queryDef">

<select> <node expr="[delivery/mailParameters/subject]" label="Subject (Delivery/Email header parameters)" alias="@subject"/>

</select>

<sysFilter>

<condition>fill the condition you want</condition> </sysFilter>

</queryDef>

);

 

To see the result after above code add below code

var output = queryDemo.ExecuteQuery();

for each(var rec in output)

{

logInfo(" Subject line "+ rec.@subject)

}

 

Thanks

adithyacs86

Hi Kapil, I have tried doing the same like below:-

 

var query = xtk.queryDef.create(
<queryDef schema="temp:enrich" operation="select">
<select>
<node expr="@deliveryID"/>
</select>
</queryDef>)

var res = query.ExecuteQuery();
for each(var element in res){

delivery = NLWS.nmsDelivery.load(element.@deliveryID)

subject = delivery.mailParameters.subject;

logInfo("delivery =" + element.@deliveryID + "Subject= " + subject);

sqlExec("update "+vars.tableName +" set ssubjectLine='"+subject+"'");

 

I can get the log Info of the deliveries of the subject line. But I am not able to load the data to the variable that I have created in the previous enrichment activity, which is the sqlExec code just after the logInfo in the above script. 

 

Requesting for an help. 

 

Thanks,

Adithya