Reverse Version 8 (Net)

Action group: Collections


Description

The action reverses the order of items in the specified list.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ListList for processing.Robin.Collection
Yes

Special conditions of use

None.

Example of use 

Task

There is a variable "Collection 1" consisting of city records:

The order of elements in the list should be reversed. To check this, get the values of elements "0" and "1" by index, write the values to the corresponding variables "City 1" and "City 2". Then, display the names of the found cities one by one in the dialog box. 

Solution

Use the action "Reverse" and "Get value by index" and "Show message". 

Implementation

  1. Assemble a robot scheme consisting of actions:


  2. Create variables "City 1" and "City 2" (type "Object")


  3. Set the "Reverse" action parameter.


  4. Set the parameters of the "Get value by index 1" action. 


  5. Set the parameters of the "Get value by index 2" action. 


  6. Set the parameters of the "Show message 1" action. 


  7. Set the parameters for the "Show message 2" action. 


  8. Start the robot using the "Start" button in the top panel. 

Result 

2 dialog boxes with the cities "Berlin" and "Tokyo" are displayed consecutively. 

  • Нет меток