Get the number of elements in a dictionary Version 12 (Net)
Action group: Collections
Description
Returns the number of elements contained in the dictionary
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Dictionary | Dictionary for processing | Robin.Dictionary | Yes | |
Results | ||||
The number of pairs | The number of pairs «Key-Value» in the dictionary | Robin.Numeric |
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 the number of records and output the result (sum) in the dialog box
Use the actions "Get the number of elements in a dictionary", "Message".
Implementation
- Create a numeric variable "Sum of records", which will be used as the result of the "Get the number of elements in a dictionary" action.
- Move the "Get the number of elements in a dictionary" 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 entries = 2 is displayed in the dialog box.
Обзор
Инструменты контента