Find collection of Appointments for a particular associate between two dates
Get a collection of Appointments for a given associate within a specified range of dates
Namespace:
SuperOffice.COM.SuperOfficeDB
Assembly:
SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
SyntaxSOAppointments Appointments(
int assoc,
DateTime FromDate,
DateTime ToDate
)
Function Appointments (
assoc As Integer,
FromDate As DateTime,
ToDate As DateTime
) As SOAppointments
Dim instance As IFind
Dim assoc As Integer
Dim FromDate As DateTime
Dim ToDate As DateTime
Dim returnValue As SOAppointments
returnValue = instance.Appointments(assoc,
FromDate, ToDate)
SOAppointments^ Appointments(
[InAttribute] int assoc,
[InAttribute] DateTime FromDate,
[InAttribute] DateTime ToDate
)
Parameters
- assoc
- Type: SystemInt32
Associate id - FromDate
- Type: SystemDateTime
Earliest date for the search (inclusive) - ToDate
- Type: SystemDateTime
Latest date for the search (inclusive)
Return Value
Type:
SOAppointmentsSOAppointments a collection of appointments for a particular associate
ExamplesAppointments
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
This will count all appointments in the given time range
Dim objSO
Dim objFind
Dim objAppoint
Dim objA
Set objSO = CreateObject("SuperOfficeDB.Database")
If not (objSO is nothing) Then
objSO.login "<USERID>", "<password>"
set objFind = objSO.Find
set objAppoint = objFind.Appointments(objSO.UserAssociateId, #1/1/2000#, #12/31/2000#)
Set objA = objAppoint.GetFirst
no = 0
While Not objAppoint.EOF
no = no + 1
Set objA = objAppoint.GetNext
Wend
MsgBox "There were " & no & " appointments in the given time range for user with associate_id = " & objSO.UserAssociateID
Else
MsgBox "Could not log in"
End If
Set objSO = Nothing
See Also