XenoGuard Documentation

Count

Actions » Programming » Dictionary » Count 

The action Count retrieves the number of key-value pairs in the dictionary and stores the numerical value in Count of the result list.


[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. In the Dictionary node, select the Count action.

Parameters:

The action has the following input parameters:


name Description
Dictionary The name of the dictionary where the key-value pairs are to be counted.

Allowed Context Scopes [Local, Global]

Results:

The action returns the following results:


name
description
Count Contains the number of key-value pairs in the dictionary.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Example 1 (Tallies the number of items in the dictionary):

This example counts the number of key-value pairs in the local dictionary named Employees. The result Count is then output via Write Text.

See other dictionary operations:

Create
Add
Get
Get At
Contains
Iterate
Remove
Remove At
Clear