Navigation bar
  Home Print document Start Previous page
 88 of 234 
Next page End  

Gravitybox Schedule Primer
Page 86 
1998-2004 Gravitybox Software LLC
the number of ScheduleItems. If there is one or more
appointments there will be at least one Conflict group object
present.
FindItem
This method will return the conflict group object that
contains the specified ScheduleItem. It takes a
ScheduleItem object as a parameter and returns that
object’s associated Conflict object.
IsConflictByAppt
Given a ScheduleItem object this event will determine if
there is a conflict with any other existing ScheduleItem. You
may optionally choose to ignore one or more of the
ScheduleItems as well by specifying the IgnoreIndexes.
IsConflictByData
Given the information needed to build an appointment (date,
time, room, length), this method will return a Boolean value
that determines if the specified space if free of
appointments.
Item
Given a Conflict index [1..M], this method returns a
reference to the object the collection.
The Count method will simply return the number of items in the Conflicts collection. An
appointment has a conflict if it is in a group that contains more than one ScheduleItem.
The “FindItem” method takes a ScheduleItem as a parameter and returns its associated
Conflict group object. You may then use the Conflict object returned to determine which
appointments conflict with the specified appointment by accessing the Conflict object’s
ScheduleItems collection. The code below will display the number of conflicts for the
first appointment.
Dim oScheduleEl As CScheduleEl
Dim oConflict As CConflictEl
Set oScheduleEl = Schedule1.ScheduleItems(1)
Set oConflict = Schedule1.Conflicts.FindItem(oScheduleEl)
Call MsgBox("Conflict Count: " & oConflict.ScheduleItems.Count, vbInformation)
The “IsConflictByAppt” method is given a ScheduleItem object as a parameter. It will
then return a Boolean value that determines if the specified appointment conflicts with
any other appointment. This method is useful when you wish to check for conflicts but
wish to ignore some appointments. You may specify any number of indexes to ignore in
the search with the second parameter.
The “IsConflictByData” is particularly useful as well. You may specify the information
needed to build an appointment (date, time, room, length) and this method will return a
Boolean value that determines if the specified space is free of appointments. You do not
need an existing appointment, just the data of a proposed appointment. This method
can be used to check for free spaces. Again, the IgnoreIndexes parameter may be used
to ignore any number of existing appointments of which you do not care about conflicts.
The ignore indexes are numbers separated by a space, comma, colon, or semicolon.
http://www.purepage.com