Skip to main content

Else

Sophie avatar
Written by Sophie
Updated over 2 months ago

Definition and Usage

Execute actions if all previous conditions are false. This command is used as part of conditional logic structures in RPA workflows to implement alternative execution paths when no previous conditions have been met.

Note: The Else command is used with an if command and decides what to do if the previous command is false.


Parameter Values

Input parameters

This action does not require any input parameters.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

While the Else command itself doesn't require variables as parameters, it functions as part of a conditional structure that typically works with variables:

  • The Else command executes its actions only when all preceding If/Else If conditions evaluate to false

  • It should be placed after If or Else If commands in your workflow sequence

  • Variables can be used within the actions contained inside the Else block

Notes

  • The Else command must be preceded by at least one If command in the workflow structure

  • Only one Else command should be used in a single conditional block

  • The Else command will execute its child actions unconditionally if reached (since it represents the default case)

  • Else is typically used as the final part of an If/Else If/Else structure to handle all remaining scenarios

  • The command provides a default execution path when no other conditions in the conditional structure are satisfied


Example

This workflow will check if the first operand (10) is greater than the second operand (5), if the condition is true, then print an information log (correct), or else, it will print another information log (wrong), then the flow will end.

Did this answer your question?