activities
latest
false
UiPath logo, featuring letters U and I in white
Workflow Activities
Last updated Nov 13, 2024

If

System.Activities.Statements.If

Enables your project to take one of two different courses of action, depending on whether a specified condition is met. This activity contains a Condition, a Then branch, and an optional Else branch. The Condition field must contain a Boolean expression according to which either the Then or the Else branch is executed. The Then branch comprises the activities to be performed if the condition is true. The optional Else branch comprises the activities to be performed if the condition is false. To display the Else branch, click Show Else in the body of the activity.

For more complex scenarios, you can use the Else If activity.

To learn how to use this activity, see:

Project compatibility

Windows | Windows - Legacy | Cross-Platform

Windows and Cross-Platform Configuration

  • Condition - The condition to evaluate which activity to execute.
  • Then - The activity to execute in case the condition is true, add it using the plus icon, or drag and drop it here.
  • Else - The activity to execute in case the condition is false, add it using the plus icon, or drag and drop it here.

Windows - Legacy Configuration

From the activity body
  • Condition - The condition to evaluate which activity to execute.
  • Then - The activity to execute in case the condition is true, add it using the plus icon, or drag and drop it here.
  • Else - The activity to execute in case the condition is false, add it using the plus icon, or drag and drop it here.
From the properties panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

Misc

  • Condition - The condition to evaluate which activity to execute.
  • Private - If selected, the data used in the activity is not logged.

This activity is built by Microsoft. For more information, see the official Microsoft documentation.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.