Subscribe

UiPath Apps

The UiPath Apps Guide

Function: Sort

📘

Tip:

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

Use this function to sort the information from a source based on its fields.

Note: This function performs a case insensitive check.
Note: This function does not work with an array of a complex object of a process.

SyntaxDescriptionExample
Sort(Source, [Field, SortOrder], ...)Sorts the rows of a given array or range by the values in one or more columns.



Arguments

ArgumentTypeDescription
SourceRequiredThe table, array, or Entity to search (for example, a control's data property or the result of a process).
FieldRequiredThe field by which to sort. It is mandatory if the source list contains complex objects. For common types (number, string, date etc), the field should not be specified. Multiple fields can be specified.
SortOrderRequiredChoose between Ascending/ASC or Descending/DESC.
By default, the value is ASC.

Example

  • Sort(Customer, Name): Sort customers from a table by name (ascending order by default since no other value is given).
  • Sort(Customer, City, Age): Sort customers from a table by city and age (ascending order by default since no other value is given).
  • Sort(Customer, City, ”DESC”, Age): Sort customers from a table by city in a descending order, and by age in an ascending order.
  • Sort(Customer, City, ”ASC”, Age, “DESC”): Sort customers from a table by city in a ascending order, and by age in an descending order.

Updated 9 months ago

Function: Sort


Suggested Edits are limited on API Reference Pages

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