UiPath Activities

The UiPath Activities Guide

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 three sections: Condition, Then, and Else. The Condition field has to contain a Boolean expression according to which either the Then or the Else section is executed. The Then section comprises the activities to be performed if the condition is true. The Else section comprises the activities to be performed if the condition is false.

Properties

Common

  • DisplayName - The display name of the activity.

Misc

  • Condition - The condition according to which either the activities in the Then or those in the Else section are executed. This field only accepts Boolean expressions.
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Important!

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

System.Activities.Statements.If

Description

Evaluates a condition added using the Condition Builder and executes one or more activities specified in the Then branch when the condition is met. Optionally, another set of activities specified in the Else branch is executed when the condition is not met.

To learn how to use this activity, see:

Configuring the Activity

In the Body of the Activity

  • Condition - Click Plus plus button on the right side of the field and then, from the menu, select Condition Builder to define the condition according to which either the activities in the Then or those in the optional Else branch are executed. Alternatively, you can select an Excel file and then a cell with a conditional statement, or you can select Open in Advanced Editor to enter a VB expression.

    In the Condition Builder:

    • Select a first value from the Plus plus button menu for the field on the left. You can select data from the Project Notebook, a parent Excel file or Outlook account (cells in Excel, fields in Outlook messages), use the output value of another activity that you previously saved for later, enter text or numbers.
    • Select an operator from the drop-down menu in the middle to evaluate the first value: greater than, greater than or equal, less than, less than or equal, equal to, not equal to, is empty, is not empty, is true, is false, starts with, ends with, contains.
    • If applicable, select a second value with which to compare the first value from the Plus plus button menu for the field on the right.

    For example, to add the condition "the value in the Excel cell B6 is greater than 10", for the first value you indicate the B6 cell in Excel, you select is greater than as the operator, and you enter the number 10 as the second value.

To add multiple conditions, click Add in the Condition Builder and provide the same information for each additional statement. When you add multiple statements, a drop-down menu appears at the top of the window where you must select when the condition is met: All (AND) if the condition is met when all of the statements are true, or Any (OR) if the condition is met when any of the statements is true.

  • Show Else - Display the optional Else branch where to add activities to execute when the condition is not met, if applicable.

In the Properties Panel

Common

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

Misc

  • Condition - See Condition in the body of the activity.
  • Private - If selected, the data used in the activity is not logged by StudioX.

Updated 2 months ago


If


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.