Copy a sublist Version 13 (Net)

Action group: Collections 


Description

The action copies a portion of a list of the designated length, starting at the specified index, excluding the outermost value within those bounds, and returns it as a new list.

Action icon

Settings  of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ListList for processing.Robin.Collection
Yes
IndexIndex of the start elementRobin.Numeric
Yes
LengthNumber of copied valuesRobin.Numeric
No
Results
ListNew list which contains copied values.Robin.Collection

Special conditions of use

None. 

Example of use

Task

There is a variable "Collection 1" consisting of 10 values, it is required to copy 9 values (starting from the index of the initial element "1") and write the result to the variable "Collection 2". 

Solution

Use the "Copy a sublist" action.

Implementation

  1. Move the "Copy a sublist" action to the workspace.


  2. Create a variable with the type "Collection" - "Collection 2".  


  3. Set the parameters of the "Copy a sublist" action:


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

Result

The variable "Collection 2" contains 9 values.

  • Нет меток