# Rule: If-Then-Else

> To condition the behavior of a control, use the **If-Then-Else** rule.

To condition the behavior of a control, use the **If-Then-Else** rule.

The **If-Then-Else** rule consists of:

1. the condition(s) to check (the **If** statement)
2. what happens if the condition is true (the **Then** statement)
3. what happens if the condition is false (the **Else** statement)

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/apps/apps-docs-image-290837-7b91166c.webp)

## The If Statement

Use the **Expression editor** ![](https://dev-assets.cms.uipath.com/assets/images/apps/apps-image-280277-10751768.webp) to define a condition query.

You can compare two values, or group multiple comparisons by using the **And** or **Or** operators.

## The Then/Else Statements

You can insert any other rule in the **Then** and **Else** statements.
