Sort Version 13 (Net)
Action group: Collections
Description
The action sorts the collection in a specified order. You can sort only homogeneous collections in which all the elements are of the same type
Action icon
Parameters
Input parameters
Parameter | Description |
---|---|
Collection | Collection to be processed. |
Sort order | Sort order. |
Output parameters
Result - the result collection will be saved in the "Collection" action parameter.
Settings
Property | Description | Type | Filling example | Mandatory |
---|---|---|---|---|
Parameters | ||||
Collection | Collection to be processed. | Collection | yes | |
Sort order | Sort order Dropdown list:
| String | ascending | no |
Results | ||||
This action has no result. The result collection will be saved in the "Collection" action parameter. |
Special conditions of use
For numeric elements, sorting is done by value, for text elements alphabetically, and for all others by length.
After sorting a new indexing is assigned.
Example of use
Task
There is a "Collection 1" variable with the list of the countries:
Sort the entries in descending order (alphabetically), get the index value "0" and display the found city in the dialog box.
Solution
Use the"Sort", "Show message" and "Get value by index" actions.
Implementation
- Assemble a robot scheme with the action:
- Set the "Sort" action parameters.
- Set the "Get value by index" action parameters.
- Set the "Show message" action parameters.
- Click "Start" in the top panel to start the robot.
Result
The collection was sorted in descending order, and a dialog box with the country "Russia" was displayed.