활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi,
I have created a new field in my campaign to which I will add a value. What I want to achieve is that when I add a delivery that field is kept with the same value that I put in the campaign.
Regards
@_Manoj_Kumar_ @ParthaSarathy @Parvesh_Parmar @DavidKangni
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
@yansu , any field is fine.
Use the same script, but Replace the below @intenalName and @start with your campaign attribute, like expr="@campaignField1" expr="@campaignField2"
<node expr="@internalName"/><node expr="@start"/>
and inside for each loop, modify delivery.deliveryCode with delivery.deliveryNewAttribute
delivery.deliveryCode = eventT.@start;
To be clear, If you create 2 new attribute in campaign as @campaignField1 and @campaignField2
And create 2 new attribute in delivery as @deliveryField1 and @deliveryField2,
The script should be like,
var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@campaignField1"/><node expr="@campaignField2"/></select>
<where><condition expr={"@id = '"+instance.operation_id+"'"}/></where>
</queryDef>);
var eventExistss = query.ExecuteQuery();
for each (var eventT in eventExistss.operation)
{
delivery.deliveryField1 = eventT.@campaignField1;
delivery.deliveryField2 = eventT.@campaignField2;
}
Note: This value will be reflected in delivery schema, and delivery created.
But in Campaign UI, while editing the delivery, or in delivery activity, these values wont get reflect in activity.
You should go to the data schema and modify the attribute adding this:
expr="[operation/attribute]"
This will automatically add the operation/attribute value to the attribute you add the expression to.
If your attribute is in another node, move around the nodes using "[../operation/attribute]". The ".." will make you go to the next upper node.
Regards, H.
Hi,
it didn't work
this is my xml:
<input colspan="2" label="Campo 1" readOnly="true" xpath="operation/@start" name="proof"/>
<set expr="operation/@start" xpath="prueba"/>
thank you in advance
조회 수
답글
좋아요 수
Hi @yansu ,
For Example,If you are adding a field to the Campaign Dashboard Edit Tab and trying to add the value there it can be as shown below and try adding value to it
In the Delivery activity, Please call this field as "<%= message.delivery.operation.product_id %> "
Also, if you want to add a value to a query attribute , you can add alias to it as shown below and call it in your delivery activity
Example field added in query activity
In Delivery
Regards,
Pravallika.
조회 수
답글
좋아요 수
Hi @yansu ,
Considering the example, if you want to add campaign's 'start date' field value as Delivery's 'Delivery code' field,
Right click the delivery activity > script tab, paste the below script and run the Campaign WKF.
var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@internalName"/><node expr="@start"/></select>
<where><condition expr={"@id = '"+instance.operation_id+"'"}/></where>
</queryDef>);
var eventExistss = query.ExecuteQuery();
for each (var eventT in eventExistss.operation)
{
delivery.deliveryCode = eventT.@start;
}
Add your campaign attribute in the select tag, eg, <node expr="@end"/>
And modify delivery.deliveryCode with your attribute,
eg, delivery.yourDeliveryAttribute = eventT.@end;
RESULT:
Hi
I think I have not explained well.... As an example I am testing it with dates but later I want it to be any other data, then what I want to achieve is that this data entered in the campaign is displayed in the new test fields that I created when adding the delivery to the campaign
Thank you in advance
@yansu , any field is fine.
Use the same script, but Replace the below @intenalName and @start with your campaign attribute, like expr="@campaignField1" expr="@campaignField2"
<node expr="@internalName"/><node expr="@start"/>
and inside for each loop, modify delivery.deliveryCode with delivery.deliveryNewAttribute
delivery.deliveryCode = eventT.@start;
To be clear, If you create 2 new attribute in campaign as @campaignField1 and @campaignField2
And create 2 new attribute in delivery as @deliveryField1 and @deliveryField2,
The script should be like,
var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@campaignField1"/><node expr="@campaignField2"/></select>
<where><condition expr={"@id = '"+instance.operation_id+"'"}/></where>
</queryDef>);
var eventExistss = query.ExecuteQuery();
for each (var eventT in eventExistss.operation)
{
delivery.deliveryField1 = eventT.@campaignField1;
delivery.deliveryField2 = eventT.@campaignField2;
}
Note: This value will be reflected in delivery schema, and delivery created.
But in Campaign UI, while editing the delivery, or in delivery activity, these values wont get reflect in activity.