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

SOLVED

queryDef on nms:group

MarcelSzimonisz
Community Advisor
Community Advisor

Hello,

Does anybody know how to get data of nms:group from JS using queryDef or any other method available?

Marcel

1 Accepted Solution
MarcelSzimonisz
Correct answer by
Community Advisor
Community Advisor

Hello Vipul,

the table rcpGrpRel is empty in our installation. this is only being populated when targeting dimension is exatly the recipient type, right?

I need to query group (list) which has additional data to targeting dimension. I have foung the sqlSelect() which is working

1345457_pastedImage_0.png

var res = sqlSelect("document,@field:string:255",

        "select sField from grp110315177");

for each (var item in res.document)  

logError(item.@field);

BR,

Marcel

View solution in original post

2 Replies
Vapsy
Employee
Employee

Hi Marcel,

There are two types of lists that can be created in Campaign.

1. List of type Group - Created manually using the recipients. Targeting dimension is nms:recipient

2. List if type List - Created using workflow and can have any type of targeting dimension.

Here is a queryDef construct for list of type Group

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

<select>

<node expr="[recipient/@lastName]" label="Last name"/>

<node expr="[recipient/@firstName]" label="First name"/>

<node expr="[recipient/@email]" label="Email Address"/>

<node expr="[recipient/@phone]" label="Phone"/>

<node expr="[@group-id]"/>

<node expr="[@recipient-id]"/>

</select>

<where>

<condition expr="[@group-id] = <ID value of group you are interested in>"/>

</where>

<orderBy>

<node expr="[@recipient-id]"/>

</orderBy>

</queryDef>

Do define the ID of group you are interested in, inside the where condition.<ID value of group you are interested in> <ID value of group you are interested in>

For the list type it will be a bit complex and I'll have to conduct few additional tests.

Hope this helps. Can you confirm if this suffices your requirement?

Regards,
Vipul

MarcelSzimonisz
Correct answer by
Community Advisor
Community Advisor

Hello Vipul,

the table rcpGrpRel is empty in our installation. this is only being populated when targeting dimension is exatly the recipient type, right?

I need to query group (list) which has additional data to targeting dimension. I have foung the sqlSelect() which is working

1345457_pastedImage_0.png

var res = sqlSelect("document,@field:string:255",

        "select sField from grp110315177");

for each (var item in res.document)  

logError(item.@field);

BR,

Marcel

View solution in original post