UiPath if-then programming tutorial
Conditional statements are at the heart of all software programs. In UiPath, these statements take on two forms:
- The UiPath Studio If Then activity
- The UiPath Studio Switch activity
To a lesser extent, the UiPath iterative While, Do While and For Loops exit when a boolean condition is met. But when we talk about conditional statements in the popular RPA tool, we’re referencing the UiPath If activity, and to a lesser extent Switch.
UiPath If-Then activity example
To use a UiPath conditional If-Then activity, follow these steps:
- Drag the conditional UiPath If activity onto the workflow.
- Add a conditional statement that resolves to either true or false.
- Add logic to the Then block of the UiPath If-Then activity.
- Optionally click Show Then to add logic to the Then condition.
All of the standard UiPath Studio activities can be placed in UiPath’s conditional If activity, so your programming options are limitless.
|A strategy to learn UiPath Orchestrator|
|There are five phases involved in order to create, deploy and manage RPA robots at runtime:
Nested If–Then UiPath conditionals
For more complex logic, you can nest UiPath If activities within each other, which will create a rich tapestry of logical decisions. It’s worth noting that if the logic gets too complicated, refactoring the code into multiple sequences might be a good idea. Or you could use a UiPath workflow.