История страницы
...
Remove object Version 16 (Net)
Группа действий: Коллекции
Описание
Действие удаляет объект из коллекции по его индексу или значению.
Иконка
Параметры действия
Входные параметры
Коллекция Коллекция для обработки.
Индекс Порядковый номер позиции, которую необходимо удалить. Нумерация начинается с 0.
Значение Значение удаляемого элемента
Настройки
...
Свойство
...
Описание
...
Тип
...
Action group: Collections
...
Description
The action removes an object from the collection by its index or value
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Collection | Collection for processing | Robin.Collection | Yes | |
Index | The index of the element to remove | Robin.Numeric | No | |
Value | The value of the element to remove | Robin.Object | No | |
Results | ||||
Result | The resulting variable containing removed value | Robin.Object |
Special conditions of use
The resulting collection will be stored in the action parameter "Collection".
If you specify an index and a value at the same time, the action will accept only the index, not the value, as input.
Case:
"Collection 1" contains
...
Особые условия использования
Если указать индекс и значение одновременно, то действие примет как входной параметр только индекс, не значение.
Кейс:
"Collection 1" содержит:
- 0. Russia
- 1. Japan
- 2. Germany
Если в действии указать параметры индекс If you specify the parameters index "1", и значение and the value "Germany" in the action, то "Collection 1" примет следующий видwill take the following form:
- 0. Russia
- 1. Germany
Пример использования
Задача
Существует переменная "Collection 1" со значениями стран:
Необходимо удалить значение с индексом "0" . Затем получить значения по индексам "0" и "1", результаты вывести в диалоговые окна.
Решение
Example of use
Task
There is a variable "Collection 1" with the values of the countries:
It is necessary to delete the value with index "0" . Then get the values with indexes "0" and "1" and output the results in dialog boxes.
Solution
Use the actions Воспользоваться действиями "Remove object", "Get value by index", "Show message".
Реализация
Implementation
- Assemble a robot scheme consisting of actionsСобрать схему робота, состоящую из действий:
- Создать переменные с типом Create variables with the type "Object":
- Настроить параметры действия Set the parameters of the "Remove object" action.
- Настроить параметры действия Set the parameters of the "Get value by index 11" action.
- Настроить параметры действия Set the parameters of the "Get value by index 2index 2" action.
Настроить параметры действия - Set the parameters of the "Show message 1message 1" action.
- Настроить параметры действия Set the parameters for the "Show message message 2" action.
- Запустить робота по кнопке "Запуск" в верхней панелиLaunch the robot using the "Start" button in the top panel.
Результат
Result
The required object is removed from the collection (value Требуемый объект удален из коллекции (значение "China"). Отображены последовательно два диалоговых окна со странами Two dialog boxes with the countries "Japan" и and "Russia" are displayed consecutively.