ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Scheduler functions
  • Associating an appointment with multiple resources
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Universal Windows 10 App In Universal Windows 10 App mode, this function can only be used to handle the Scheduler controls found in a report.
Example
// Adds a 1-hour appointment for tonight
MyResource is string
MyTitle is string
StartAPT is DateTime
MyResource = "Vince"
MyTitle = "Sales meeting"
StartAPT = DateSys() + "17000000"
SCH_Scheduler.AddAppointment(MyResource, MyTitle, StartAPT)
Syntax

Adding an appointment while specifying its characteristics Hide the details

<Result> = <Scheduler control>.AddAppointment(<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 <Scheduler>.AddResource 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> = <Scheduler control>.AddAppointment(<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

<Scheduler>.AddAppointment associates an appointment with a single resource. To associate one appointment with multiple resources, call <Scheduler>.AddAppointment for each resource.
Related Examples:
WD Schedule 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
Component: wd290mdl.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help