Exit the sub-routine
Exit the sub-routine
Ends the current sub-routine and returns data to the robot or sub-routine that called it. It is how you expose computed values, or actions, as reusable outputs.
Sub-routines only
This action only appears in the menu when what you are editing is a sub-routine. In an ordinary robot it is not shown.
- Version 4.0
- Version 3.0
- Version 2.0
- Version 1.0
Options
The sub-routine's outputs
The values or actions the sub-routine exposes to whoever called it. Use Add output to add more. Each output has:
- Output type — whether the output is an ordinary value (text, a number, a boolean and so on) or an action (the output of an action in the designer).
- Output name — the identifier the calling robot references it by. It has to be unique in the list.
- Output content — shown according to the output type:
- For an ordinary value: a value editor taking text, a number, a boolean, an array, code, a date, a time or an action's output.
- For an action: a designer action picker, to choose which action is returned as the output.
Options
The sub-routine's outputs
The values the sub-routine exposes to whoever called it. Use Add output to add more. Each output has:
- Output name — the identifier the calling robot references it by. It has to be unique in the list.
- Output content — the value returned. It takes text, a number, a boolean, an array, code, a date, a time or an action's output.
Returns
This action produces nothing inside the sub-routine. The data you define here is available as the output of the Call a sub-routine action in the calling robot.
Rules and conditions
- In versions 3.0 and 4.0 you can add as many outputs as you need with Add output, and remove any of them individually.
- In version 4.0, Output type has to be set before you can configure the content — the content editor only appears once it is selected.
- Output name has to be unique within the same Exit the sub-routine action's list of outputs.
- A sub-routine can have several Exit the sub-routine actions on different paths of the flow (inside Decision blocks, for instance), each returning different values.
- The calling robot reaches every defined output through Call a sub-routine.
- In versions 1.0 and 2.0, the action ends the sub-routine without exposing named output data.