Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!

How to pass the ctx variable from js to page activity

Avatar

Level 2

Hi,

I am trying to pass the values from context variable called "playerPercentageData"  which contains this data.
<playerPercentageData>{"P2":"33%","P3":"11%","P6":"11%","P4":"22%","P1":"11%","P5":"11%"}</playerPercentageData>

I would like to send these percentage to the data progress value.

Akila4_0-1707729928324.png

Can anyone help on this ?

 

 

 

 

1 Reply

Avatar

Employee

Hi Akila,

You can pass the value to a variable like this and use a loop to populate.

 

var ppData = "<%=ctx.vars.playerPercentageData %>";

var valuesString = ppData.split(",");

 

Thanks

Bhartendu