Hi,


I read about the reusability of actions in Outsystems 11 Mobile Apps. Unlike Web applications, it would be possible to reuse screen actions. So I tried this. For a certain screen I have included the SaveOnClick action again in the SaveOnClick action itself (so recursive). 

Is recursion not better to use in client and server actions only, instead of screen actions?

Kind regards,

René Cornet

I guess I'd first ask why you want to call the Screen Action recursively, rather than encapsulating the logic to be reused within a separate Client Action, and calling that as needed?

Regardless of whether this is possible, I'd suggest that it's not advisable, as recursion almost always makes it harder to understand where you are in a given logic flow, and can lead to hard-to-troubleshoot bugs.

Hi G. Andrew,


In some cases recursion can be useful, but not with actions without output. In these cases it is not possible to stop them. They will continue indefinitely. So, I'm not willing to use screen actions recursively


Maybe I used the wrong heading. Better will be: "Should it be possible to use recursive screen action in Mobile 11".


Regards, 

René Cornet

Yes, I understand that recursion can be useful, and sometimes necessary.

What I am trying to understand is what the use case is here?

You say: "...I'm not willing to use screen actions recursively" and I agree with that practice. 

Is your question more theoretical than practical? In other words, are you asking whether the platform itself should prevent this?

Yes, I will move this call to Outsystems.

Thanks!