Page History
...
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<0, 1> | Entity ID | Text | ID of the entity to which the appointment belongs | "" |
<0, 2> | ID | Text | The unique key ID of the appointment used to identify it in other properties, methods, and events | "" |
<0, 3> | Start Date & Time | Decimal | The appointment's start date & time in OI internal format | 0.0 |
<0, 4> | End Date & Time | Decimal | The appointment's end date & time in OI internal format | 0.0 |
<0, 5> | Back Color | Color | The color of the appointment block | Select |
<0, 6> | Fore Color | Color | The color of the appointment's text | SelectText |
<0, 7> | Title | Text | The appointment's title text | "" |
<0, 8> | Description | Text | The appointment's desciption | "" |
<0, 9> | Lead Time | Decimal | Time from start of appointment | 0 |
<0, 10> | Lead Back Color | Color | The color of the lead time, if any | 3DFace |
<0, 11> | Lead Text Color | Color | The color of the lead time's caption and border | 3DShadow |
<0, 12> | Lead Time Caption | Text | The caption to appear in the center of the lead time area | "Lead Time" |
<0, 13> | Trail Time | Decimal | Time from end of appointment | 0 |
<0, 14> | Trail Back Color | Color | The color of the trail time, if any | 3DFace |
<0, 15> | Trail Text Color | Color | The color of the trail time's caption and border | 3DShadow |
<0, 16> | Trail Time Caption | Text | The caption to appear in the center of the trail time area | "Trail Time" |
<0, 17> | Conflict Zone Start Date & Time | Decimal | The date and time where the conflict zone begins. | 0 |
<0, 18> | Conflict Zone End Date & Time | Decimal | The date and time where the conflict zone ends. | 0 |
<0, 19> | Class | Text | A 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 |