XenoGuard Documentation

Contains

Actions » Programming » Dictionary » Contains 

The action Contains determines if a key exists in a created dictionary and stores the Boolean result in Contains of the result list.


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

Parameters:

The action has the following input parameters:


NAME DESCRIPTION
Dictionary The name of the dictionary where the key is to be searched.

Allowed Context Scopes [Local, Global]
Key
The key to be searched within the dictionary.

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

Results:

The action returns the following results:


NAME
DESCRIPTION
Contains Contains the Boolean response after searching the key in the dictionary.

Allowed Context Scopes [Fixed, Local, Global]

Information The Key parameter can be an empty or a null value for reference types.

Example 1 (Checks the presence of a key in the dictionary):

This example validates if a key is present within the created local Employees dictionary. The Boolean result is passed to the If flow control statement and the value of Text parameter is then output via Message Box.

See other dictionary operations:

Create
Add
Get
Get At
Count
Iterate
Remove
Remove At
Clear