Subscribe

UiPath Apps

The UiPath Apps Guide

Using Expressions

📘

Enabling the Expressions Preview for an app

During the public preview, expressions can be enabled on a per-app basis. Once enabled, expressions cannot be disabled. To enable expressions for you app:

  1. Navigate to your app settings by clicking the âš™ icon next to your app name in the tree view.
  2. Toggle the Expressions switch at the bottom of the page.
  3. Click Ok in the confirmation dialog. After clicking Ok, the homepage will be displayed. You can just go back to your app and expressions will be enabled.

After enabling expressions, your app's data bindings will be automatically updated and you can start using expressions right away!

When expressions become generally available, this feature will be enabled for all apps and this option will be removed from the Preview and Experimental Features section.

To better understand how expressions and operators can be chained together to create more complex behaviors, follow the examples below.
For more information on the subject, see About Expressions and About Functions.

Calculator

To build a simple calculator, follow the procedure below.

Step

Action

1

Open your already existing application or start a new one.

2

Add two textboxes with a label in between.
Change the name of the controls as follows:
First textbox: FirstNumber
Label: +
Second texbox: SecondNumber

3

Add another label after the second textbox.
Change the name to Sum.

4

Add the following expression to the Sum label:
= FirstNumber + SecondNumber

After following the procedure above, the app will look as in the image below.

Input validation

To build a simple input validation, follow the procedure below.

Step

Action

1

Open your already existing application or start a new one.

2

Create an app variable called Number.

3

Create a textbox that is value bound to the Number variable.
Add the default text 0.

4

Add a label with the following text: This value is greater than or equal to 5!.

5

Add the following expression to the Hidden property:
=Number <5

When the inserted number is lower than five, the validation label is hidden. After following the procedure above, the runtime should look like below:

Updated 29 days ago

Using Expressions


Suggested Edits are limited on API Reference Pages

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