- Associating an appointment with multiple resources
SchedulerAddAppointment (Function) In french: PlanningAjouteRendezVous Adds a new appointment into a Scheduler control. If the Scheduler control is linked to a data source, the appointment is also added into the data source.
// Adds a 1-hour appointment for tonight MyResource is string MyTitle is string StartAPT is DateTime MyResource = "Vince" MyTitle = "Sales meeting" StartAPT = DateSys() + "17000000" SchedulerAddAppointment(SCH_Schedule, MyResource, MyTitle, StartAPT)
Syntax
Adding an appointment while specifying its characteristics Hide the details
<Result> = SchedulerAddAppointment(<Scheduler control> , <Resource> , <Title> , <Start date> [, <End date> [, <Category>]])
<Result>: Integer - Index of added appointment,
- -1 if an error occurred. ErrorInfo is used to identify the error.
Remark: The added element can be directly handled via its subscript by using the following notation:
<Scheduler control>[<Index>]
You can modify the properties of this element.
<Scheduler control>: Control name Name of Scheduler control into which the appointment will be added. This control can correspond to: - the Scheduler control of a window,
- the Scheduler control of a page,
- the Scheduler control of a report.
<Resource>: Character string Name of resource associated with the appointment. If the schedule resources have been created with SchedulerAddResource by using gStoredValue, this parameter must correspond to the value specified in gStoredValue for this resource. The resource is automatically created if it does not exist. <Title>: Character string Title of appointment. <Start date>: Character string or DateTime variable Start date and time of the appointment. <End date>: Optional character string or optional DateTime variable End date and time of the appointment. If this parameter is not specified, the default duration of the appointment will be set to 1 hour. <Category>: Optional character string Name of category associated with the appointment. If this parameter is not specified, the appointment is associated with no category. The category is automatically created if it does not exist.
Adding an appointment into a Scheduler control by using the Appointment type Hide the details
<Result> = SchedulerAddAppointment(<Scheduler control> , <Appointment>)
<Result>: Optional integer - Index of added appointment,
- -1 if an error occurred. ErrorInfo is used to identify the error.
Remark: The added element can be directly handled via its subscript by using the following notation:
<Scheduler control>[<Index>]
You can modify the properties of this element.
<Scheduler control>: Control name Name of Scheduler control into which the appointment will be added. This control can correspond to: - the Scheduler control of a window,
- the Scheduler control of a page,
- the Scheduler control of a report.
<Appointment>: Appointment variable Appointment variable that describes the characteristics of the appointment to be added. Remarks Associating an appointment with multiple resources SchedulerAddAppointment associates an appointment with a single resource. To associate one appointment with multiple resources, call SchedulerAddAppointment for each resource.
Related Examples:
|
Complete examples (WINDEV): WD Schedule
[ + ] This example presents the management of a graphic schedule. The following topics are presented in this example: 1/ the scheduler control 2/ the Google Calendar functions
|
This page is also available for…
|
|
|
|