All appointments in the control.

Usage

Set_Property(OLECtrlEntID, "OLE.AppointmentList", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<0, 1>Entity IDTextID of the entity to which the appointment belongs""
<0, 2>IDTextThe unique key ID of the appointment used to identify it in other properties, methods, and events""
<0, 3>Start Date & TimeDecimalThe appointment's start date & time in OI internal format0.0
<0, 4>End Date & TimeDecimalThe appointment's end date & time in OI internal format0.0
<0, 5>Back ColorColorThe color of the appointment blockSelect
<0, 6>Fore ColorColorThe color of the appointment's textSelectText
<0, 7>TitleTextThe appointment's title text""
<0, 8>DescriptionTextThe appointment's desciption""
<0, 9>Lead TimeDecimalTime from start of appointment0
<0, 10>Lead Back ColorColorThe color of the lead time, if any3DFace
<0, 11>Lead Text ColorColorThe color of the lead time's caption and border3DShadow
<0, 12>Lead Time CaptionTextThe caption to appear in the center of the lead time area"Lead Time"
<0, 13>Trail TimeDecimalTime from end of appointment0
<0, 14>Trail Back ColorColorThe color of the trail time, if any3DFace
<0, 15>Trail Text ColorColorThe color of the trail time's caption and border3DShadow
<0, 16>Trail Time CaptionTextThe caption to appear in the center of the trail time area"Trail Time"
<0, 17>Conflict Zone Start Date & TimeDecimalThe date and time where the conflict zone begins.0
<0, 18>Conflict Zone End Date & TimeDecimalThe date and time where the conflict zone ends.0
<0, 19>ClassTextA custom string that classifies this appointment according to the application's needs.""

Remarks

The AppointmentList property contains all the appointments stored in the control. Each field in the list represents a single appointment. The control needs to know about all of them in order to properly display overlapping appointments.

An appointment is associated to an existing entity by that entity's ID. Therefore, you must call EntityList prior to calling AppointmentList. The next value is the appointment's ID.

Each appointment MUST have a completely unique ID. This ID is used elsewhere to quickly identify any appointment. An appointment cannot have the same ID as any other entity, group, or appointment. IMPORTANT! Keys are case sensitive. For example, "Key" is different than "KEY".

TIP: Avoid using semi-colons in your IDs or some properties will not work correctly, such as ApptFlag.

The start and end times use OI's internal format for date & time, thus you will have to IConv your data if it's not already in this format (or if your date and times are stored separately).

The colors of the appointment are defined by the Back Color and Fore Color values. Color customization provides the ability to categorize appointments whether by status, type of appointment, etc.

Currently, appointments can show a title and a description. The title is displayed at the top with the description beneath it. The title must be a single line, but the description may be multilined.

Values <9> - <12> represent a lead time. A lead time is a differently color portion of the appointment starting from the appointment's Start Date & Time. The lead time value is a total number days. So, a lead time of 1 would be represented as 1 day from the Start Date & Time. A lead time of 0.020833 would be represented as 30 minutes from the Start Date & Time. Lead times can be useful for showing related information, such as travel time or preparation time. You can customize the background, text colors, and caption. The caption always appears in the center of the lead time.

Values <13> - <16> represent a trail time. Trail times are just like lead times, except that start from the appointment's End Date & Time and span backwards. Like the lead time, you can customize the caption and colors.

Values <17> and <18> represent the optional conflict zone of an appointment. By default, when two appointments overlap within the same entity, they are in conflict. However, you can use these values to allow some overlap without conflict. For example, if your appointment goes from 8:00am to 9:00am, but you would like to allow the first and last 10 minutes of the appointment to not cause conflict, when you can set values <17> and <18> to 8:10am and 8:50am respectively. Like the start and end times of the appointment, these values must be in OI's internal datetime format.

Value <19> allows you to classify appointments, which can be useful in managing your appointments in large systems. It accepts any string you pass in, but the usefulness comes into play when you use the same string for a classification of appointments. You might classify appointments by status, author, season, etc. It's up to you.

Users can SHIFT + DRAG the top or bottom of appointments to create or modify lead and trail times, unless turned off via the AllowLeadTime or AllowTrailTime properties.

Example

Declare function Min, Max 

Desc = "This is a long description of the appointment, which contains very important details" 
ForeColor = "RGB{255, 255, 255}" 

// Give all appointments a lead time of 60 minutes 
LeadTime = 0.041667 

// Create random appointments for the next 30 days 
Appts = "" 
ID = 0 
For i = 1 to 30      
   Count = 0 
   CurrDate = Date() + i 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey2-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey2-1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey2-1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey2-1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
   Appts<-1> = "EntityKey2-1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime 
   Count = Count + 1; ID = ID + 1 
   GoSub Get_Random_Data 
Next i 

// Add the appointments 
Set_Property(@Window:".OLE_SCHEDULE", "OLE.AppointmentList", Appts) 

Get_Random_Data: 

   // Generate random times 
   Time1 = Rnd( 48 ) * 1800 
   Time2 = Rnd( 48 ) * 1800 
    
   // Convert to OI Internal DT format 
   StartTime = IConv(OConv(CurrDate - Rnd(2), "D4/") : " " : OConv(Min(Time1, Time2), "MTS"), "DT") 
   EndTime = IConv(OConv(CurrDate, "D4/") : " " : OConv(Max(Time1, Time2), "MTS"), "DT") 
        
   // Generate random back color 
   BackColorHue = Rnd(256) 
   BackColor = "HSL{":BackColorHue:", 127, 45}" 

return

See Also

EntityListAllowLeadTimeAllowTrailTime

  • No labels