If you assign a value on basis of Js, there are two approaches you can follow
i) If your using the script in any client action just set one Output parameter for the script with the respective value assigned, and assign that Output parameter to the local variable on the next step.
ii) If you're passing the value from web block using trigger event, In the event handler of the screen assign the local variable with the value.
Hope it helps!
" If your using the script in any client action just set one Output parameter for the script with the respective value assigned, and assign that Output parameter to the local variable on the next step. "
The local variable and the input is in the screen, not in the webblock, in the webblock I have placeholders
Can you pls share any screenshot or sample oml to understand, how you set the value for the input widget?
Geting the objects
Setting the value:
Are you trying to do this for educational purposes ?
No. I am trying to create a widget with the possibility of the input and textarea in the calling side. If you know how to do it with Outsystems client actions , please go forward, how to set inside the webblock something that is outside?
I am not sure what you mean by this.
You can now access the value through the local variable, but this does not work for you?
Are you trying something similar?
I think you didn't understand , the input is in a screen and the widget is a webblock (where I am trying to set the value of the input) , how do you access the local variable that is in the screen inside the webblock?
To have the input in your screen changed when something in your webblock changes, you can create an event and trigger it. then handle that event in your screen.
1: the input on the screen
2: the webblock.
and the raiseeventclick action in the webblock:
Replace input text value by text in a string
ResultView the demo in separate window
How do I change the input value of a file?
How do you change the input value in HTML?
Input Text value Property.
Change the value of a text field: getElementById("myText"). ... .
Get the value of a text field: getElementById("myText"). ... .
Dropdown list in a form: var mylist = document. ... .
Another dropdown list: var no = document. ... .
An example that shows the difference between the defaultValue and value property:.
How do you reset input value?
Create a button..
Get the id of input field..
Set the value NULL of input field using document. getElementById('myInput'). value = ”.