История страницы
...
The action adds the specified objects to the collection by index. By default, to the end of the list.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Collection | The collection to which the object will be added | Robin.Collection | Yes | |
Index | The ordinal number of the position where the value should be inserted. Numbering starts from 0. | Robin.Numeric | No | |
Object | The 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
- Assemble a robot scheme with the actions.Собрать схему робота, состоящую из действий:
- Создать переменную Create a variable "Variable" со значением with value "Richard".
- Создать перменную Create a variable "Collection" со следующими значениямиwith following values:
- Настроить параметры действия Set the "Add object" action parameters.
- Настроить параметры действия Set the "Contains object" action parameters.
- Запустить робота по кнопке "Старт" в верхней панели.
Результат
Добавлена новая запись со значением "Richard" и индексом "2".
- Click "Start" in the top panel to start the robot.
Result
A new entry with value "Richard" and index "2" was added.
The collection contains an entry with value Коллекция содержит запись со значением "Richard".