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
Обзор
Инструменты контента