UiPath If Then Activity Example Tutorial

Here’s a simple UiPath If Then Activity example that helps you learn how to implement conditional logic in UiPath Studio.

The three keys to the UiPath If Activity are:

  1. Add the If activity to the workflow
  2. Specify a boolean condition that resolves to either true or false
  3. Code the Then block of the If activity
  4. Code the Optional else block of the UiPath If activity

One thing that was interesting in UiPath Studio 21.4 is the “Show Else” option. I don’t think that was available in older versions.

I like this option, as the UiPath If activity would be very wide and consume the whole visible space, as the Else block would always show, even if it wasn’t being used.

For a more complicated example of nested UiPath if activities, check out this more advanced video tutorial: