Hi,
I'm trying to use the RunJavascriptAdvanced action. the test is simple:
The issue is that each time I get the value of the previous test, previous button click. Calling the RunJavascriptAdvanced action twice doesn't improve the issue.
What do I do wrong?
Regards
Tomasz
Hi @Tomasz M Lipinski
I’m not sure whether you’re using a Reactive or a Traditional app, but here’s some information that may help:
This Forge component works properly in Traditional Web applications. You can check the AdvanceJS Demo for reference.
In Reactive Web applications, it doesn’t work as expected due to architectural limitations.
It will be much easier for others to help if you attach your OML file. That way, people can better understand your scenario and provide an accurate answer.
Hope this helps!
Peter Hieu
Please find the attached .oml. Run it, enter the desired script (it can be just: "123"), click Run. The result will be displayed under the "Results" label.
I've downloaded and run your test.oml. It behaves in the exactly same way as mine:
Your test is build using OuSystems UI Web library, mine - using the deprecated Dublin template and Silk UI Web library. But it doesn't matter. I'm also using a very old version of Service Studio (11.14.16) but I pretty believe it also doesn't matter.
Kind regards
I tried it but it still doesn’t work. However, you can check this Forge component — it might help when you need to use JavaScript.
How to use JS on Outsystems.
Hope this helps
Hi @Peter Hieu ,
thanks for the answer. The referred component is a good job for novices. But unfortunately they all show techniques which I'm already familiar with and which don't address my case.
My case is: being inside a screen action how to call some JS script and immediately get the returned result. The Run Javascript Advanced seemed to be the answer but there is some issue with using it - as I described.
You say "...it still doesn't work". Do you mean that the example .oml (that I've attached) works in the way I described, i.e. it doesn't return the evaluated value immediately?