Screen javascript variable to local variable

Hi ,

In container onclick, I have called the function which is defined in the screen javascript editor in traditional web app.

Is it possible to pass the output of the screen javascript to the local variable?



Usually, we use a hidden input (placed in the OutSystems side) associated with a variable, and when we want to pass the value from JavaScript, we use JavaScript to set the input value. 

When submitting, the variable in OutSystems will have the value.


Hi @Eduardo Jauch!

I'm having the same issue. I'm assigning the value property of my input and I can even see on the browser console the value, but my local variable remains empty. 


Any idea as to why this can happen?


Eduardo Jauch absolute right as usual!)

A bit more in detail, set hidden style for input and give name to it. Then use in your JS following statement: document.getElementById('"+Input.Id+"').value =YourValue.

If vice versa use the OutSystems variable in JS, then: var JSVar = '" + OutsystemsVar + "'.

Good luck!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.