Get value by index Version 13 (Net)

Action group: Collections


Description

Gets the value of the element whose ordinal position number is equal to the specified one.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
CollectionCollection for processingRobin.Collection
Yes
IndexThe ordinal number of the position from which the value should be retrieved. Numbering starts from 0.Robin.Numeric
Yes
Results
ValueVariable of type Object containing the value of the element at the specified index.Robin.Object

Special conditions of use

None.

Example of use

Task

There is a variable “Collection 1” consisting of 10 records with the names of different cities. It is necessary to extract the value from position No. 5 and display it in a dialog box. 

Solution

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

Implementation

  1. Create an “object” variable where the value you are looking for will be written.



  2. Move the “Get value by index” action to the workspace and set its parameters. 

     

  3. Move the “Show message” action to the workspace and set its parameters.



  4. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully. The dialog box displays the value you are looking for at index 5.


  • Нет меток