queryDef on nms:group | Community
Skip to main content
Marcel_Szimonisz
New Participant
November 9, 2017
Solved

queryDef on nms:group

  • November 9, 2017
  • 2 replies
  • 2743 views

Hello,

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

Marcel

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 Marcel_Szimonisz

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

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

        "select sField from grp110315177");

for each (var item in res.document)  

logError(item.@field);

BR,

Marcel

2 replies

Marcel_Szimonisz
Marcel_SzimoniszAuthorAccepted solution
New Participant
November 10, 2017

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

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

        "select sField from grp110315177");

for each (var item in res.document)  

logError(item.@field);

BR,

Marcel

vraghav
Employee
November 10, 2017

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