Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Sort Version 13 (Net)

Action group: Collections

...

Description

The action sorts the collection in the specified order. You can sort only homogeneous collections in which all elements are of the same type.

Action icon

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
CollectionCollection for processingRobin.Collection
Yes
Sort orderSort orderRobin.String
Yes

Special conditions of use

  1. For numeric items, sorting is done by value, for text items by alphabetical order, and for all other items by length.
  2. After sorting, a new indexing is assigned.

Example of use

Task

There is a variable "Collection 1" with a list of countries.
Image Added
It is necessary to sort the records in descending order (alphabetically), get the value at index "0" and output the found city in the dialog box. 

Solution

Use the actions "Sort", "Show message", "Get value by index".

Implementation

  1. Assemble a robot scheme consisting of actions: 
    Image Added
  2. Set the "Sort" action parameter.
    Image Added
  3. Set the "Get value by index" action parameter. 
    Image Added
  4. Set the "Show message" action parameter.
    Image Added
  5. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully.

The collection is sorted in descending order, and a dialog box with the country "Japan" is displayed.
Image Added

Сортировать по ключам / Sort by keys 

Группа действий: Коллекции

Сортирует пары словаря по ключам в указанном порядке.

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

Словарь для обработки.

...

Порядок сортировки.

Выпадающий список:

  • от А до Я
  • от Я до А

...

Переменная, в которую будет записан результирующий словарь.

...

Особые условия использования

...