Return Value for Screen Action/Accessing local variable from callback action

Hi guys,

Merry Xmas to everyone.

Been stuck at this for the whole day so i'm hoping to get some help regarding it.

So I'm using FullCalendar plugin inside a mobile app.

This is my onReady action that sets up the calendar. It sets the eventRender to call FulCalEventRender client action


This is the FulCalEventRender client action

I have two requirements.

1. The eventRender function must access the local variable of the screen showEdits. This is a flag to determine whether edited events are to be shown or not.

This is the reason that I extracted eventRender javascript out into a client action.

If I put all my eventRender code in the onReady action, the callback function will lose reference to the local variable showEdits.

2. FullCalEventRender Client action needs to return a boolean that controls whether an event is shown of not.

First each EventRender sets an output parameter of displayEvent (seen in 2nd image)

Then, the result is retrieved and returned (seen in 1st image)

From OS docs, I understand only GLOBAL client actions can return values to the caller not screen actions.

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Mobile_App_Using_JavaScript

However, using a global client action means I am unable to access local variables from my screen. My first requirement will not be fulfilled.

In essence, there are two questions.

1. Are there other ways for the callback function to keep reference to my local variable showEdits?

2. Can a screen client action return a value? Can't use a local variable to return it because I won't have reference to the local variable due to the 1st question.


Thanks a lot for your help.


Best,


Barnett