This product version has reached end of life and is no longer supported. Click here for the latest documentation.
Service Studio 8.0 Help
About Input Parameters
Input parameters allow you to send data so that it becomes available for processing in the scope of an element (action, screen, ...).
Examples
The GetUserProfile action uses an input parameter to allow specifying which user profile it is going to fetch.
The Video_Show screen displays a video. To identify which video to play, an input parameter is used.
An input parameter is used to change the behavior of the web block. The screen using the web block can specify is the user submitted comments are displayed expanded or collapsed.
Elements Having Input Parameters
Input parameters can be used in the following elements:
Screens
Web ,
, Screen Blocks ,
External Sites and
Actions
Processes
Process Activities
Adding and Removing Input Parameters
To add an input parameter to an element, do as follows:
Right-click the element (web screen, web block, ...) in the eSpace tree, and select Add Input Parameter ;
Rename the input parameter;
Specify if the data type is mandatory or optional, and its data type. Learn more about the input parameter properties .
To delete a parameter, right-click it in the eSpace tree and select the option Delete .
Once you create input parameters, you need to specify the values that are send through them (also known as the arguments of the action). For example, if a screen action has the ProductId input parameter, the button that triggers it, needs to specify the value of the argument.
The following elements can specify an input parameter value:
Action when executing an action in an action flow;
Button , Link , and SMS Elements using commands when executing a screen action or linking to a screen, in a screen;
Destination when linking to a screen, in a screen preparation or screen action;
Web Block widget when executing a screen block, in a screen.
Execute Process when executing a process in a process flow.
Conditional Start , Human Activity , and Wait process activities when they have the instances created and executed in a process;
Handling Input Parameters in Actions and Web Blocks
When using input parameters in Actions and Web Blocks, it is important to understand how they are handled by the OutSystems Platform: by value or by reference.
Most Service Studio data types are passed by value , i.e. a new memory location is created for each input parameter with the value being copied from the argument. Any later change made to it inside the scope of, for example, the action does not affect the value of the argument in the caller scope.
In the example below, if the GetUserProfile internally changes the value of the UserId input parameter, it is only changing its own copy. No changes are made to the UserId of the action that is executing the GetUserProfile action.
However, to avoid performance deterioration, there are data types that are passed by reference:
Binary Data,
Object,
Record Lists.
For these data types, no copy is created, meaning that changes done inside the scope, are reflected in the caller scope. In the example below, the action receives a Record List through an input parameter, and modifies the list to include a new user. This change will also be reflected in the action that is executing the AddUserToList action.
What You Should Know
Due to the OutSystems Platform architecture, when referencing Actions or Web Blocks from other eSpaces, input parameters are sent by value, regardless of their data type.
This means that in the previous example, if the AddUserToList is an action referenced from other eSpace, it internally creates a copy of the UserList and appends a new User to that list. However, this change is not reflected outside the scope of the AddUserToList action, since only the copy of the UserList is changed.
See Also
Input Parameter Properties | Data Types of Input Parameters | About Variables | About Output Parameters | Use User Functions