Returns true if the given item exists in the collection
Checks whether there exists a member in the collection at the given index.
Namespace:
SuperOffice.COM.SuperOfficeDB
Assembly:
SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
SyntaxFunction Exists (
Id As Integer
) As Boolean
Dim instance As IAssociates
Dim Id As Integer
Dim returnValue As Boolean
returnValue = instance.Exists(Id)
bool Exists(
[InAttribute] int Id
)
Parameters
- Id
- Type: SystemInt32
Index into the collection. The first assocaite has index 0. Use the Count() method to get the total number of associates in the collection
Return Value
Type:
BooleanBoolean True if such an associate exists
Implements
IMapCollectionExists(Int32)
ExamplesExists
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
Dim objSO
Set objSO = CreateObject("SuperOfficeDB.Database")
If not (objSO is nothing) Then
objSO.login "<USERID>", "<PASSWORD>"
set associates = objSO.GetAssociateList
msgbox "There are " & associates.count & "assocates in the collection"
set first = associates.item(0)
msgbox "The first one is: " & first.fullname
associates.remove(0)
Msgbox "This associate was removed from memory"
msgbox associates.exists(3)
Else
MsgBox "Could not log in"
End If
Set objSO = Nothing
See Also