UiPath If-Then conditional statements

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:

  1. Drag the conditional UiPath If activity onto the workflow.
  2. Add a conditional statement that resolves to either true or false.
  3. Add logic to the Then block of the UiPath If-Then activity.
  4. 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:

  • An RPA program must be developed in UiPath Studio. In this ongoing example, I use the UiPath Hello World app created in a previous tutorial.
  • A UiPath Orchestrator robot must be created, which is demonstrated here.
  • The UiPath Assistant must be configured so projects written in UiPath Studio can be published to UiPath Orchestrator.
  • A UiPath orchestrator process must be created to associate RPA programs with the robot that runs them.
  • UiPath triggers can optionally be set to schedule the execution of unattended robotic RPA processes.

Nested IfThen 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.

App Architecture
Software Quality
Cloud Computing