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

Ключ

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

...

The action adds the specified objects to the collection by index. By default, to the end of the list.

Action icon

Image Modified

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
CollectionThe collection to which the object will be addedRobin.Collection
Yes
IndexThe ordinal number of the position where the value should be inserted. Numbering starts from 0.Robin.Numeric
No
ObjectThe object to add to the collection.Robin.Object
Yes

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

Special conditions of use

If adding multiple objects is necessary click on the plus iconПри необходимости добавить несколько объектов следует нажать на знак плюса:

По умолчанию в действии 3 параметраThe action has 3 parameters by default:

  • Collection
  • Index, нумерация начинается с numbering starts with 0
  • Object

Каждый новый параметр Each new "Object" - новый элемент коллекции, добавляется после предыдущего.

Если заполнен параметр "Index", то все новые объекты вставляются начиная с этой позиции.

Кейс:

parameter is a new element of the collection, added after the previous one.

If the "Index" parameter is set, all new objects are inserted starting from this position.

Case:

There was a "Collection" with valuesБыла "Collection" со значениями:

  • Example 1
  • Example 2
  • Example 3

Добавляем действие, у которого входные данные следующиеAdd action with the following input data:

Ожидаемый результатExpected result: "Collection"

  • Example 1
  • Text 1
  • Text 2
  • Example 2
  • Example 3

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

Задача

Example of use

Task

There is a Существует переменная "Collection" со значениямиvariable with values:

  • Mia
  • Daniel
  • Daniel

Требуется добавить в коллекцию значение Add the value "Richard" с порядковым номером позиции with position number "2" . Далее провести проверку добавленного значения при помощи действия to the collection. Then check the added value using the "Contains object" action. 

...

Solution

Воспользоваться действиями Use the "Add object" и and "Contains object" actions. 

Реализация 

Implementation 

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


  2. Создать переменную Create a variable "Variable" со значением with value "Richard". 


  3. Создать перменную Create a variable "Collection" со следующими значениямиwith following values:


  4. Настроить параметры действия Set the "Add object" action parameters. 


  5. Настроить параметры действия Set the "Contains object" action parameters.

  6. Запустить робота по кнопке "Старт" в верхней панели. 

Результат

Добавлена новая запись со значением "Richard" и индексом "2".

Image Removed


  1. Click "Start" in the top panel to start the robot.

Result

A new entry with value "Richard" and index "2" was added.

Image Added

The collection contains an entry with value Коллекция содержит запись со значением "Richard".