Using a non-function client action in a client function results in an error

In a mobile app or reactive web app I want to have a client action that is marked as a function, and internally I want that action to call another action which is not a function.  I get this error: Only actions that are functions can be used in other functions.

In traditional web I can do this no problem.  Why the difference for mobile and reactive?  Is there a difference between how functions and regular client actions are treated behind the scenes, and if so what is that difference.  


Thanks,

Greg

Hi Greg, 


I found the reason of that in the documentation: Client Actions marked as functions must be synchronous and cannot execute Server Actions
 

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Errors/Invalid_Client_Function


BR,

Luis


Thanks Luis,

That’s close but not exactly what I’m trying to do. I want a client function to call a client action that isn’t a function and it won’t allow it. Curious as to why.  My second client action doesn’t make any server calls.  As long as my client action is sticking to client side and Cordova calls it should allow it. 

Greg



Luís Cardoso wrote:

Hi Greg, 


I found the reason of that in the documentation: Client Actions marked as functions must be synchronous and cannot execute Server Actions
 

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Errors/Invalid_Client_Function


BR,

Luis




Greg Whitten wrote:

Thanks Luis,

That’s close but not exactly what I’m trying to do. I want a client function to call a client action that isn’t a function and it won’t allow it. Curious as to why.  My second client action doesn’t make any server calls.  As long as my client action is sticking to client side and Cordova calls it should allow it. 

Greg



Luís Cardoso wrote:

Hi Greg, 


I found the reason of that in the documentation: Client Actions marked as functions must be synchronous and cannot execute Server Actions
 

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Errors/Invalid_Client_Function


BR,

Luis




Hello again Greg,

You are right. I also tested on my site and if I click on Help (F1) the error redirects to the documentation page I sent before. So, I think the reason is something similar and should be because "Client Actions marked as functions must be synchronous"

But in fact this error is not listed on that page and should be explained there.


Hope it helps you.


BR,

Luis