apps
latest
false
UiPath logo, featuring letters U and I in white
LEGACY
Apps User Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Aug 5, 2024

Using Expressions

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!.
docs image

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:



Sum of a Column

To return the sum of a specified column of a table bound to Orchestrator output, follow the procedure below.

In this example we will retrieve the sum of a column called Age, containing the age of all people listed in the table.

Step

Action

1

Open your already existing application or start a new one.

2

Create a table with a column called Age.

3

Bound the table column to an Orchestrator output by selecting it in the Data Source property. In this example we will pick a source called Out.out_datatable.
docs image

4

Create a label and write SUM(AGE): in the Text property.

5

Create a second label right next to the first one and pick the Sum function and out.datable.Age from the Resources list.=Sum(out_datatable.Age) in the Text property.
docs image

6

Save the app and preview it.

  • Calculator
  • Input Validation
  • Sum of a Column

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.