How to pass the ctx variable from js to page activity | Community
Skip to main content
Level 2
February 12, 2024
Solved

How to pass the ctx variable from js to page activity

  • February 12, 2024
  • 1 reply
  • 538 views

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.

Can anyone help on this ?

 

 

 

 

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 Bhartendu_Jha

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

1 reply

Bhartendu_JhaAdobe EmployeeAccepted solution
Adobe Employee
February 12, 2024

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