apps
2022.4
false
UiPath logo, featuring letters U and I in white
Apps User Guide for Automation Suite
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Apr 19, 2024

About Functions

To help you define particular Expressions or include individual operations while designing your app, an out of the box set of Functions is provided within the designer.

Note: Depending on the function specifications some have a graphical representation, while others do not.

Start using the available functions by selecting the needed operator, input the parameters, and wait for the output value to be returned.

Note:
  • The accepted parameters can be the same type of arguments or implicit cast of arguments.
  • The output value can be primitive or an object.

Function Operators

Mathematical Operators and Functions

Please access this page for more details.

Arithmetic Operators

Operator

Description

Example

+

Addition

x = y + 2

-

Subtraction

x = y - 2

*

Multiplication

x = y * 2

/

Division

x = y / 2

%

Modulus (division remainder)

x = y % 2

++

Increment

x = ++y

--

Decrement

x = --y

x = y--

String Operators

We'll use the following hypothesis to present the string operators: text1 = "Good ", text2 = "Morning", and text3 = "".

Operator

Example

text1

text2

text3

+=

text1 += text2

"Good Morning"

"Morning"

""

&

text3 = text1 + text2

"Good "

"Morning"

"Good Morning"

Comparison Operators

We'll use the following hypothesis to present the comparison operators: x = 5.

Operator

Description

Comparing

Returns

=, ==

equal to ("=" is the same as "==")

x == 8

x == 5

false

true

>

greater than

x > 8

false

>=

greater than or equal to

x >= 8

false

!=

not equal

x != 8

true

<

less than

x < 8

true

<=

less than or equal to

x <= 8

true

Logical Operators

We'll use the following hypothesis to present the logical operators: x=6 and y=3.

Operator

Function

Description

Example

!, not, NOT

Not()

not

!(x === y) is true

&&, and, AND

And()

and

(x < 10 && y > 1) is true

||, or, OR

Or()

or

(x === 5 || y === 5) is false

Other Operators

The in operator returns a true result if the specified property is in the specified object, otherwise, it returns a false result.
Note:
The in operator only supports primitive data types, such as string, number, boolean, null.
The in operator is not supported in Data Service scenarios using choice-set. You can use the contains operator instead, but only for one input.

Function: Guid

Use this function to generate a unique identifier.

Syntax

Description

Guid()

Returns a unique identifier.

Function: New

Note: To better understand how the New function works, check out the Using Apps with Data Service pages in the How To section.

Use this function to create a new in-memory entity. This entity is not stored in the data service until a Create entity rule is run.

You can use the New function to create a new entity record, while the Lookup function creates a data context which can only be used to update an existing entity record.

For more information on using the function, see the Using the New Function page.

Syntax

Description

Example
New(Entity)

Creates a new in-memory entity.

docs image
When a new entity is created using the New function, the default values are automatically filled in.

Function: Lookup

Tip: To better understand how the Lookup function works, check out the Using Apps with Data Service pages in the How To section.

Use this function to find and return the first record in a table that satisfies a formula or condition.

Syntax

Description

Example

Lookup(Entity, Condition)

Returns the first entity record that matches the condition.

docs image

Function: Filter

Note: To better understand how the Filter function works, check out the Using Apps with Data Service pages in the How To section.

Use this function to filter a table based on its fields.

This function performs a case insensitive check.

Note:
Depending on your project's needs, you can choose to exclude certain conditions when using the Filter function. To exclude a condition, you can write an expression that resolves the filter field (first parameter of the condition array) to a null. For example, you can use the following:

Filter(Customer, [If(IsBlank(Dropdown.Value), null, City), "=", Dropdown.Value])

In this case, the filter on City is only applied when the Dropdown contains a value other than blank.

Syntax

Description

Example

Filter(Entity, Condition)

The function returns all records that result in true. These expressions can reference fields/columns by name.

docs image

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.