24
Views
4
Solved
###### Variables
Question

Difference between input ,output and local variable with example?

MVP
Solution

Hi,

Here is the official OutSystems documentation on input parameter, output parameter and local variable:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Variables

Regards,

Daniel

MVP

Hello there Sangam,

Hope you're doing well.

This is not an OutSystems related question, but it is more a generic programming question.

I'll try to explain to you with an example. So let's say you have a function called Sum.

This Sum function executes a simple operation: the sum of 2 numbers and gives you the returning value.

Let's say you have to do a sum of 3 and 4 numbers: 3 + 4 = 7.

In programming, you should call the Sum function to execute this operation. Something like this: Sum(3, 4) and it returns the value 7.

In this case, you're calling the Sum function and 3 and 4 are input variables of this function. The resulting value 7 is the output.

Of course, this is a very simple operation example. But imagine that you have a very complex function with lots of operations and logic in the middle and you need to keep auxiliar values for your calculations. You can keep those in local variables. Local variables allow you to store data in the scope that you are operating.

Anyway, this is indeed a beginner question :) so I strongly suggest that you take a look into OutSystems Guided Paths, I'm sure these courses will help you for the future!

Hope that this helps you!

Kind regards,

MVP
Solution

Hi,

Here is the official OutSystems documentation on input parameter, output parameter and local variable:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Variables

Regards,

Daniel

The actual Question is about the scope of local , input parameter and output parameter in both client and server action and  can we access the input parameter of a client action in server action's input parameter