Expand my Community achievements bar.

Linking field value to Custom tag section ins web analytics

Avatar

Level 7

Hey I have scenario where I want to populate the web analytics section custom tag with Campaign name(Folder name).

 

I know it can be entered manually while creating new deliveries, but I want this field to be populated dynamically when we create new delivery. I have trying to achieve this by adding some code in input forms. so far it did not work. Below is the code am using. Not sure where its going wrong and am sure its missing something.Any thoughts on this approach?

 

<postSave>

<if expr="@label != ''">

<set expr="Coalesce(@@label, 'defaultvalue can be anything that you want as default')" xpath="webAnalytics/@tag1"/>

<set value="nms:delivery" xpath="/ignored/writer/delivery/@xtkschema"/>

<set value="update" xpath="/ignored/writer/delivery/@_operation"/>

<set expr="[@id]" xpath="/ignored/writer/delivery/@id"/>

<soapCall name="Write" service="xtk:persist">

<param exprIn="[/ignored/writer/delivery]" type="DOMDocument"/>

</soapCall>

</if>

</postSave>

 

pradeep_07_0-1594827134844.png

Thanks,

 

Pradeep

9 Replies

Avatar

Community Advisor

Hello @pradeep_07 

 

If you want to have a the default value as Label add use the code below, instead of Post Save my suggestion would be to use enter. Because if the value is overridden manually then the value won't change because post-save will overwrite the manual entry.

 

The code to auto-populate the label will be 

<enter>
<set expr="iif(@label != '', @label, 'DEFAULT_VALUE_HERE')" xpath="webAnalytics/@tag1"/>
</enter>

 

Let me know if that works.

 

Thanks,

 


     Manoj
     Find me on LinkedIn

Avatar

Level 7

Hi Manoj, I have enter the given code in input forms under nms:delivery and refreshed the deliveries. Still dont see the values in tag1.

 


Custom.JPG

 

 


 
Updating Media

 

Avatar

Community Advisor
Hello Pradeep, You will have to logout from the adobe console and login again. Only then the changes will come in action.

     Manoj
     Find me on LinkedIn

Avatar

Level 7

Hi Manoj , I logged out and logged in. Still dont see the values.tag1.JPG

Avatar

Administrator

Hi @pradeep_07,

Were you able to solve this?



Sukrity Wadhwa

Avatar

Level 7
Hi, I was able to solve this issue by myself. I will post the solution.

Avatar

Level 1

Hi Pradeep

can you please share the solution it will be very helpful.

Avatar

Level 1

Hi Pradeep

can you please share the solution for same it will be verry helpful.

thanks

Avatar

Administrator
Hi @pradeep_07, The community would really appreciate if you could post your solution on this thread. It would help others facing the same issue. Thanks!


Sukrity Wadhwa