Accepted Solutions (1)

Accepted Solutions (1)

MarcelSzimonisz

MVP

10-11-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

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

Answers (1)

Answers (1)

Vapsy

Employee

09-11-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