10
Views
3
Comments
Solved
Assign value to label from text box on a button click in reactive web app
Application Type
Reactive
Service Studio Version
11.10.4 (Build 36717)

hi All,


I would like to assign value of typed in text box to a label on al button click.

Please let know how we can do it.


Thanks,

Jaydeep

Rank: #459
Solution

Hi Jaydeep,


Instead of the label widget, use the  "expression" widget and assign a variable to it instead of plain text. On the button click action, just assign a value to that variable.

Rank: #128

Hi Jaydeep,

Further elaboration on Romero's answer,

if you don't want to loose the functionality of the label, rather than replacing it, replace the text widget inside of it by an expression widget.

Dorine

Rank: #507

Jaydeep,

And the other approach, you can do it through javascript. If you want only change the text without messing your button funcionality.

Tip: document.getElementById($parameters.In1).innerText = $parameters.In2;

Demo: https://is.gd/Qm6zo8


Regards ;-)