Calling client action using plain javascript script not javascript element or block

In a Reactive web application, is it possible to call a client action from a javascript script file? 

If I use a javascript element (block) I have access to the $actions global variable but this is not available in a script.

Is there a way to get a reference to the Outsystems data structures from a script element?

In the UI it looks like the script is defined without a scope which implies this is not possible.

mvp_badge
MVP

Hello there Mike,

You are indeed correct.

It is not possible to invoke a Screen Action from a Script. The Script is global, you can add the same Sript to different Screens or Blocks, that's why it is defined without a scope.


Like you said, in order to call a Screen Action from JavaScript code, you will need a JavaScript element that runs in the scope of your Screen / Block, using $actions element.


Kind regards,

Rui Barradas

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