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

Ключ

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

Insert collection

...

Version 10 (Net)

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

Действие вставляет коллекцию в список по индексу. По умолчанию в начало списка.

Иконка действия

Image Removed

Параметры 

Входные параметры

Список - Список для обработки

Индекс - Индекс в списке

Коллекция для вставки - Коллекция, которая будет вставлена в список по указанному индексу

...

Arrays 

...

The action inserts the collection into the list by index. Defaults to the beginning of the list.

Action icon

Image Added

Parameters

Input parameters

List - list for processing.

Index - index in the list.

Collection for inserting - the collection, that will be inserted in the list by the specified index.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ListList for processing.Robin.Collection
Yes
IndexIndex in the listRobin.Numeric
No
Collection for insertingThe collection, that will be inserted in the list by the specified indexRobin.Collection
Yes

 

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

Special conditions of use

For Для Java:

  • Если не заполнено поле "Индекс", то коллекция для вставки помещается в начало списка

Для Net:

  • Если не заполнено поле "Индекс", то коллекция для вставки помещается в конец списка

Пример использования

Задача

  • If the "Index" field is not filled in, the collection for inserting is placed in the beginning of the list.

For Net:

  • If the "Index" field is not filled in, the collection for inserting is placed in the end of the list.

Example of use Пример использования

Task

There is a variable "Collection-1" with 3 recordsСуществует переменная "Коллекция 1" с 3-мя записями:

  • 0. Jane
  • 1. Mary
  • 2. Kate

Переменная Variable "Коллекция Collection-2" с has 2 -мя записямиrecords:

  • 0. John
  • 1. Peter

Необходимо добавить записи Add "Коллекция Collection 2" в records to "Коллекция Collection 1". Вывести итоговое количество значений "Коллекция 1" в диалоговом окне и проверить значение по индексу Output the total number of "Collection 1" values in the dialog box and check the value by index "0".

...

Solution

Воспользоваться действием Use the "Insert collection", "Show message", "Get value by index" actions

Реализация: 

Implementation

  1. Assemble a robot scheme with the actionsСобрать схему робота, состоящего из действий:


  2. Set the "Insert collection" action parameters.Настроить параметры действия "Вставить коллекцию". 

    Настроить параметры действия "Сообщение
  3. "Set the "Show message" action parameters

    Настроить параметры действия "Получить значение по индексу". 
    Image Removed
  4. Запустить робота по кнопке "Запуск" в верхней панели. 

Результат


  1. Set the Get value by index" action parameters.
    Image Added

  2. Run the robot by clicking "Start" in the top panel.

Result

A dialog box was displayed with the number of items in "Collection Было выведено диалоговое окно с количеством элементов в "Коллекция 1". 

Получено значение по индексу The value at index "0" . Так как значения из "Коллекция 2" были помещены в конец списка "Коллекция 1"was obtained. Since the values from "Collection 2" were placed at the end of the "Collection 1" list