Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 4 Текущий »

Get length Version 14 (Net)

Action group: Collections 


Description

The action counts the number of elements in the selected collection.

Action icon

Action parameters

Input parameters

ParameterDescription
Collection or arrayCollection or array to be processed. 

Output parameters

  1. The number of elements - the number of elements in a collection or array.

Settings

Property

Description

Type

Пример заполнения

Обязательность заполнения поля

Параметры

Коллекция или массив

Коллекция или массив для обработки.

Robin.Collection


Да

Результаты

Количество элементов

Количество элементов в коллекции или массиве

Robin.Numeric



Special conditions of use

None.

Example of use

Task

There is a collection "Collection 1" with entries = Masha, Julia, Nastya, Olya. You need to count the number of items in the collection, write the result to a numeric variable "Quantity" and display the result on the screen in a dialog box. 

Solution

Use the "Get length", "Show message" actions.

Implementation

  1. Create a numeric variable "Collection" to which the action result will be written.

  2. Move the "Get length" action to the workspace and set its parameters.


    In the "Collection or array" specify the collection to be processed - "Collection".

    In the "The number of elements" specify the "Quantity" numeric variable.

  3. Move the "Show message" action to the workspace and set its parameters.

    In the "Message text" field specify the "Collection" variable with the number of entries in the collection.

    In the "Window title" specify the collection elements.

  4. Start the robot by clicking "Start" in the top panel.

Result

The screen displays a message with the result number of the collection elements. 



  • Нет меток