UiPath StudioX Preview

System.Activities.Statements.If

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:

In the Body of the Activity

  • Condition - Click 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 cells with conditional statements from the menu, or you can select Open in Advanced Editor to enter a VB expression
    In the Condition Builder:
    • Select a first value from the plus button menu for the field on the left. You can select data from applications added to cards in your project (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 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 if the condition is met when Any of the statements is true, or when All of the statements are true.
  • Show else - Display the optional Else branch where to add activities to execute when the condition is not met, if applicable.

Properties

Common

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

Misc

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.