Every action can define a set of parameters that must be passed to it. These parameters can then be used in function calls within actions, just like variables in the variable scope. A prominent example is explained at the end of this article.
Add parameters to action
To add parameters to an action, follow these steps:
- Open the Action parameters tab in the menu on the left when editing an action. This is shown in the image below.
- Click the Add a parameter button.
- Choose the parameter type. If, for example, only numbers are allowed, you should pick the Number type.
- Set a name for the parameter. This field is mandatory.
- Write an appropriate description.
Execute action function call
Action parameters are useful when using the Execute action function call. More information about it can be found on the All functions page. This function call allows you to call other actions inside the current one. You can pass arguments to the called action as follows:
- Open the Invocation configuration menu for the Execute action function call, after placing it on the grid.
- Click the Arguments tab. It looks similar to the image below.
- Select the action by clicking the input field, or make a new one by pressing the plus icon.
- Pass the action parameters defined in the action you just selected. Select it from the scope or enter it in the input field. Make sure that the data types of the variables you enter and the parameters are equivalent. In the example below, the action Other action that we wish to execute inside the current action has a parameter Address.
This is a neat way to connect multiple actions that are often developed separately. This modular approach allows you to keep actions small and readable.