Avatar

Correct answer by
Community Advisor

Hello @Greeshma_Sampath1 ,

 

Create a ctx variable in web app and use the javascript to update the value.

 

HTML Code:

<button type="button" onclick="myFunction('button1')">Button 1</button>

<button type="button" onclick="myFunction('button2')">Button 2</button>

Now use this js code to save to ctx variable.

function myFunction(button){
document.controller.setValue('/ctx/vars/buttonClicked',button);
}

View solution in original post