Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.""

...

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.

...

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).

...

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

Code Block
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