Communication between server and client actions

I am new to outsystems and I would like to know what is the best way to communication between server and client actions? Create a structure for the result from the server action and use this result in the client action? Or is the a better way for the communication? What do you recommend?

Hi! 

You can use server actions inside a client action, and use directly the output variables.

Regards 

Graça

Hi Thorsten,

Welcome to the OutSystems community!

You can view this article in order to understand how you can use client and server action. Like Maria said, you can simply drag a server action into a client action and the platform will automatically establish the communication between the client-side and server-side.

Furthermore, as a newcomer, I would recommend you to follow the Guided Paths in the Learn section. The Becoming a Reactive Web Developer is a good starting point!

Regards,

Nordin

Hello Thorsten.

If you are concerned with performance, I guess you already know the basics. Fell free to ask anything that isn't clear.


If you started in reactive/mobile, I won't warn you about the changes from Traditional.

For Reactive the key rules are mentioned by Service Studio only as warnings. You can do them wrong, but you shouldn't.

  • call a maximum of one server action. If you need more than one, create a new server action that calls all those actions and returns only the final result. This way you create fewer calls and do less client-side processing.
  • Database operations must be done server-side for security.

One common thought is to use actions as functions. If you need server data, that isn't a function. You need to fetch data asynchronously and then use it.


Thank you for the information. And thank you Nuno for the hint with the maximum one server action.