Get keys Version 8 (Java)
Action group: Collections
Description
Gets a collection of keys that have the specified value
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Dictionary | Dictionary for processing. | Robin.Dictionary | Yes | |
Results | ||||
Result | A variable containing a collection of all the dictionary keys. | Robin.Collection |
Special conditions of use
None.
Example of use
Task
There is a variable "Dictionary" with values: 1 - Moscow, 2 - Tokyo. It is necessary to get a collection of keys and output the result (sum) in the dialog box
Use the "Get keys", "Get length", and "Message" actions.
Implementation
Create a "Collection" variable that will be used as the result of the "Get keys" action.
- Move the "Get keys" action to the workspace and set its parameters
- Create a numeric variable "Sum of keys" to be used as the result of the "Get length" action.
- Move the "Get length" action to the workspace and set its parameters
- Move the "Message" action to the workspace and set its parameters
- Launch the robot using the "Start" button in the top panel
Result
The sum of dictionary keys = 2 is displayed in the dialog box
Обзор
Инструменты контента