История страницы
Get value Version 10 (Java)
Action group: Collections
...
Description
Gets the value associated with the specified key.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Dictionary | The dictionary to search for an element | Robin.Dictionary | Yes | |
Key | The key by which the dictionary lookup is performed | Robin.String | Yes | |
Results | ||||
Result | The resulting variable containing the value associated with the specified key | Robin.Object |
Special conditions of use
If you specify a non-existent key in the "Key" parameter, an error will be generated.
Example of use
Task
There is a variable "Dictionary" with values: 1 - Moscow, 2 - Tokyo. Get the value of key 1 and output it to the dialog box
Solution
Use the "Get value" and "Message" actions.
Implementation
- Create an "object" variable to record the result of the "Get value" action into it.
- Move the "Get value" action to the workspace and set the action parameters
- Move the "Message" action to the workspace and set the action parameters
- Launch the robot using the "Start" button in the top panel.
Result
The value for key 1 is retrieved from the dictionary and displayed in the dialog box
Получить значение по ключу/ get the value by key
Группа действий: Коллекции
Получает значение, связанное с указанным ключом.
Настройки
...
Свойство
...
Англ. наименование
...
Описание
...
Тип
...
Словарь для обработки.
...
Результирующая переменная.
...
Особые условия использования
Если в параметре "Ключ" указать несуществующий ключ, будет вызвана ошибка.
Пример использования
Задача:
существует переменная "Словарь" с значениями: 1 - Москва, 2 - Токио. Получить значение по ключу 1 и вывести его в диалоговое окно
Решение: воспользоваться действием "Получить значение по ключу" и "Сообщение".
Реализация:
...