What are the differences between the Input parameter, Output parameter, and local var
Question

What are the differences between the Input parameter, Output parameter, and local variable, and exactly in which cases can use these parameters?

I'm confused where to use these parameters and I'm new to this platform.



Thank you.

HI Subhash,

This is very basic. Below are the details

Input Parameter is used to send the Input Data to the server action , client Action , REST API, web block etc to perform the task

Out Put Parameter is the result of the task perform by server action , client Action ,REST API ,web block etc

Local Variable is used to hold some value while performing any task in server action , client Action , REST API ,web block etc

Hope this will help you.

Best Regards

Devendra 

Hi @Subhash T 

Input variables :- It allow you to pass a value from outside scope to the parent's scope. 

All inputs parameters get destroyed when the execution leaves the scope of parent elements.


Output Variables  :-  It will return a value from inside the parent scope to the outside scope. 

It will continue to exist in the outside scope.

It does not destroyed.

Screen doesn't have output parameter 


Local Variables  :- Exist exclusively within the scope of their parent elements. 

It destroyed when the execution leaves the parent scope.

I Hope this will help you.

Regards,

Shradha Durgade.

Hi

When I have started learning I was getting same problem as yours.

Best Suggestion just do it practically and check scope.

Like screen take local variable and try to access it from other screen.

Try to pass value from input and take from output.


Hi Subhash

input variable: If you want to take inputs/ data from another screen you have to use this.

Output variable: Screen output if you want to send to another screen you have to use this.

local variable: Remains within the screen



Hi @Swathi T 


used that oml: for your better understanding


Thanks

Mansur

input&Output&Local.oap

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.