HashTable is a simple extension that wraps the .NET Hashtable class. Currently, this extension only supports textual data. It’s recommended to install the demo application, to test all the features of the component and check implementation examples.
──────────────────────────────────────────────────────────────────────────
Table of contents
createHashTable: initializes a new instance of the Hashtable class.
containsKey: determines whether the Hashtable contains a specific key.
containsValue: determines whether the Hashtable contains a specific value.
count: gets the number of key-and-value pairs contained in the Hashtable.
keys: gets an ICollection containing the keys in the Hashtable.
values: gets an ICollection containing the values in the Hashtable.
add: adds an element with the specified key and value into the Hashtable.
get: gets the value related to a specific key.
remove: removes the element with the specified key from the Hashtable.
createHashTable
1. Create a server action
A new instance of the HashTable must be initialized inside an action (a server action or inside the Preparation). Right-click the desired screen and add the Preparation action.
2. Drag and drop the createHashTable action
Open the Preparation added previously, and drag and drop inside it the createHashTable action. The action is located under the 'Logic' tab (HashTable reference).
3. Retrieve the created HashTable
The new instance of the HashTable is returned by the createHashTable action through the hashtable output variable. Use it to manipulate the HashTable.
containsKey
Before using this action, a new instance of a HashTable must be created. Check the createHashTable section to create it if not yet created.
Right-click the desired screen and create a screen action. Name it ContainsKey.
2. Drag and drop the containsKey action
Open the ContainsKey screen action created previously, and drag and drop inside it the containsKey action. The action is located under the 'Logic' tab (HashTable reference).
3. Fill in the input parameters
The containsKey action requires 2 input parameters:
- hashtable: HashTable object used to search for the key.
- key: Key element to search in the specified HashTable.
4. Verify if the HashTable contains the key
The boolean value is returned by the containsKey action through the isPresent output variable. Use it to indicate if the HashTable contains the specified key.
containsValue
Right-click the desired screen and create a screen action. Name it ContainsValue.
2. Drag and drop the containsValue action
Open the ContainsValue screen action created previously, and drag and drop inside it the containsValue action. The action is located under the 'Logic' tab (HashTable reference).
The containsValue action requires 2 input parameters:
- hashtable: HashTable object used to search for the value.
- value: Value element to search in the specified HashTable.
4. Verify if the HashTable contains the value
The boolean value is returned by the containsValue action through the isPresent output variable. Use it to indicate if the HashTable contains the specified value.
count
Right-click the desired screen and create a screen action. Name it CountElements.
2. Drag and drop the count action
Open the CountElements screen action created previously, and drag and drop inside it the count action. The action is located under the 'Logic' tab (HashTable reference).
The count action requires 1 input parameter:
- hashtable: HashTable object used to determine the number of key-and-values pairs.
4. Retrieve the number of elements
The number of elements in the HashTable is returned by the count action through the howmany output variable. Use it to indicate the number of pairs in the HashTable.
keys
Right-click the desired screen and create a screen action. Name it GetKeys.
2. Drag and drop the keys action
Open the GetKeys screen action created previously, and drag and drop inside it the keys action. The action is located under the 'Logic' tab (HashTable reference).
The keys action requires 1 input parameter:
- hashtable: HashTable object used to get all the keys.
4. Retrieve all the HashTable keys
All the HashTable keys are returned by the keys action through the keys output variable. It is a list of textual values that can be used to display all the HashTable keys.
values
Right-click the desired screen and create a screen action. Name it GetValues.
2. Drag and drop the values action
Open the GetValues screen action created previously, and drag and drop inside it the values action. The action is located under the 'Logic' tab (HashTable reference).
- hashtable: HashTable object used to get all the values.
4. Retrieve all the HashTable values
All the HashTable values are returned by the values action through the values output variable. It is a list of textual values that can be used to display all the HashTable values.
add
Right-click the desired screen and create a screen action. Name it AddElement.
2. Drag and drop the add action
Open the AddElement screen action created previously, and drag and drop inside it the add action. The action is located under the 'Logic' tab (HashTable reference).
The add action requires 3 input parameters:
- hashtable: HashTable object used to insert the value.
- key: Key element (must be unique) to identify the specified value.
- value: Value to insert into the HashTable identifiable by the specified key.
get
Right-click the desired screen and create a screen action. Name it GetElement.
2. Drag and drop the get action
Open the GetElement screen action created previously, and drag and drop inside it the get action. The action is located under the 'Logic' tab (HashTable reference).
The get action requires 2 input parameters:
- hashtable: HashTable object used to get the value related to a specific key.
- key: Key element used to search for the corresponding value.
4. Retrieve the corresponding value
The corresponding value is returned by the get action through the value output variable. Use it to indicate the value of the specified key.
remove
Right-click the desired screen and create a screen action. Name it RemoveElement.
2. Drag and drop the remove action
Open the RemoveElement screen action created previously, and drag and drop inside it the remove action. The action is located under the 'Logic' tab (HashTable reference).
The remove action requires 2 input parameters:
- hashtable: HashTable object used to remove the value related to a specific key.
- key: Key element to identify the value to remove from the specified HashTable.