Contains
Description
Checks if a specified Key already exists.
Syntax
Function Contains(key As String) As Boolean
Parameters
Name |
Data Type |
Description |
Key |
String |
Key to check the collection for |
Return
Boolean value indicating if the key is already in the collection or not.
Example
'create Pentagon DOCS Script Library object
Set scriptLib = GetExtensionObject("PentagonDOCS.Core.ScriptLibrary")
'add key value pairs
Dim newKVP : Set newKVP = scriptLib.NewStringKvP
newKvP.Add "KeyName1","NewValue"
newKvP.Add "KeyName2","NewValue"
newKvP.Add "KeyName3","NewValue"
'contains
Dim keyExists : keyExists = newKVP.Contains("KeyName2")