# About Events and Rules

> When designing your app, you often want to provide logic for when X happens do Y. Apps provides the ability for these dynamic actions:

When designing your app, you often want to provide logic for when X happens do Y. Apps provides the ability for these dynamic actions:

* X is called an Event.
* Y is called a Rule.

Here are a few examples:

* When the "Submit deposit" button is clicked, run an automation.
* When the value of the "Cash In" textbox changes, change the label color to red if the value is &lt; 0.
* When the help icon is clicked, open the browser to show a documentation page.
* When a tab button is clicked, change the page container to show a different page.

By specifying what rules to execute when an event occurs, your app transforms from being a simple display of information to an interactive console.

## Events

Events are triggers that happen when a user interacts with an app or control. Each control supports a single event:

| Event | Control(s) |
| --- | --- |
| Clicked On | Button, Header, Label, Icon, Image |
| Value Changed | Checkbox, Date picker, Dropdown, Slider, Switch, Text Area, Textbox, List |
| Loaded | Page, Table |

## Rules

Rules allow your app to take an action when a certain event occurs. Below is a list of the rules that Apps provides:

| Rule | Description |
| --- | --- |
| [If-Then-Else](rule-if-then-else.md) | Provides support for conditional statements in the rules builder |
| [Open a Page](rule-open-page.md) | Opens a page of the app as a pop-over or as the contents of a page container |
| [Open URL](rule-open-url.md) | Opens a URL in the browser |
| [Close Pop-Over/Bottom Sheet](rule-close-pop.md) | Closes the current Pop-Over |
| [Show Message](rule-show-message.md) | Show a message as a toast notification |
| [Show/Hide Spinner](rule-show-spinner.md) | Show or hide a spinner overlay to show the app as busy |
| [Set Values](rule-set-values.md) | Set the value of a property |
| [Start Process](rule-start-process.md) | Starts an Automation |
| [Rule: Upload file to Storage bucket](rule-upload-file-to-storage-bucket.md) | Uploads files to a selected storage bucket. |
| [Rule: Get file from Storage bucket](rule-get-file-from-storage-bucket.md) | Downloads files from a selected storage bucket. |

### Reordering Rules

You can reorder rules by clicking and dragging the "gripper" on the colored chip next to the rule's name:

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