Unable to Retrieve Values from Context Variable | Community
Skip to main content
New Participant
February 8, 2024
Solved

Unable to Retrieve Values from Context Variable

  • February 8, 2024
  • 2 replies
  • 641 views

Hi Team ,
I have an array on my website that will hold several values when a user clicks the "add to cart" button. I have also created a context variable to set the values from the array, but during execution, I was unable to obtain the values from the context variable

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 _Manoj_Kumar_

Hello @sarjoon 

 

Try changing setValue code to this:

document.controller.setValue("/ctx/vars/cartData",cartItems); console.log(document.controller.getValue("/ctx/vars/cartData"))

 

2 replies

Sukrity_Wadhwa
Employee
February 27, 2024

Hi @sarjoon,

Were you able to resolve this query on your own or do you still need help here? Do let us know.

Thanks!

Sukrity Wadhwa
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
February 12, 2024

Hello @sarjoon 

 

Try changing setValue code to this:

document.controller.setValue("/ctx/vars/cartData",cartItems); console.log(document.controller.getValue("/ctx/vars/cartData"))

 

     Manoj     Find me on LinkedIn