PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Handling the Organizer control by programming
  • Adding an appointment
  • Filling an Organizer control with the data found in a HFSQL data file
  • Retrieving a list of appointments
  • Displaying an Organizer control from a specific date
  • Delete an appointment
  • Modifying the display of the control
  • Using the popup menu (AAF)
  • Advanced use of events with procedure
  • Managing bank holidays
  • Properties specific to the Organizer controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
An Organizer control can be:
To handle an Organizer control by programming, WINDEV and WEBDEV propose the OrganizerXXX functions.
This help page explains how to handle an Organizer control found in a window or in a page by programming. The example used in the illustration allows you to store appointments in an HFSQL database.
Versions 24 and later
Android Organizer controls are now available on Android applications.
iPhone/iPad Organizer controls now are available on iPhone/iPad applications.
New in version 24
Android Organizer controls are now available on Android applications.
iPhone/iPad Organizer controls now are available on iPhone/iPad applications.
Android Organizer controls are now available on Android applications.
iPhone/iPad Organizer controls now are available on iPhone/iPad applications.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 18 and later
PHP Organizer controls are now available on PHP sites.
New in version 18
PHP Organizer controls are now available on PHP sites.
PHP Organizer controls are now available on PHP sites.
Handling the Organizer control by programming

Adding an appointment

Adding an appointment into an Organizer control is performed by OrganizerAddAppointment. This function accepts two syntaxes:
  • syntax used to specify the appointment characteristics: title, description, ...
    // Adds an appointment to the Organizer control
    OrganizerAddAppointment(ORG_MyOrganizer, "Sales meeting", "201003220845", ...
    "201003221230", "Sales")
  • syntax that handles an Appointment variable.
    // Declares an Appointment variable
    MyAppointment is Appointment
     
    // Fills the appointment
    MyAppointment.Title = "Sales meeting"
    MyAppointment.Content = "Meeting to discuss the weekly objectives."
    MyAppointment.StartDate = "201003220845"
    MyAppointment.EndDate = "201003221230"
    MyAppointment.Category = "Sales"
    MyAppointment.ID = 1
     
    // Adds the appointment into the control
    OrganizerAddAppointment(ORG_Organizer, MyAppointment)
The BackgroundColor property of the Appointment variable is used to define a display color for an appointment. If no background color is defined, the Organizer control will automatically use the color associated with the appointment category.

Filling an Organizer control with the data found in a HFSQL data file

The records are stored in a HFSQL data file. The Organizer control can be initially filled by browsing the data file via the FOR EACH syntax and by adding each appointment via OrganizerAddAppointment.
// Appointment variable
MyAppointment is Appointment
 
// Browse through the appointments stored in the database
FOR EACH APT
// Fills the information of the variable
MyAppointment.Title = APT.Title
MyAppointment.Content = APT.Content
MyAppointment.StartDate = APT.StartDate
MyAppointment.EndDate = APT.EndDate
MyAppointment.Category = APT.Category
MyAppointment.ID = APT.APTID
 
// Adds the appointment to the Organizer control
OrganizerAddAppointment(ORG_MyOrganizer, MyAppointment)
 
END
Versions 16 and later
Reminder: You also have the ability to use an Organizer control linked to a data file. For more details, see Organizer control linked to a data file.
New in version 16
Reminder: You also have the ability to use an Organizer control linked to a data file. For more details, see Organizer control linked to a data file.
Reminder: You also have the ability to use an Organizer control linked to a data file. For more details, see Organizer control linked to a data file.

Retrieving a list of appointments

OrganizerListAppointment is used to get:
  • the list of all appointments in the Organizer control:
    // Array containing a list of Appointment
    arrAppointmentList is array of Appointment
     
    // Lists of appointments
    arrAppointmentList = OrganizerListAppointment(ORG_MyOrganizer)
  • the list of appointments included between two dates:
    // List of appointments for January 2010
    arrAppointmentList is array of Appointment
     
    // Lists of appointments
    arrAppointmentList = OrganizerListAppointment(ORG_MyOrganizer, "20100101", "20100131")
  • the appointment currently selected or hovered:
    // Selected appointment
    arrAppointmentList is array of Appointment
     
    arrAppointmentList = OrganizerListAppointment(ORG_MyOrganizer, orgAptSelected)

Displaying an Organizer control from a specific date

To display the Organizer control from a specific date, use OrganizerPosition.
// Position the Organizer control on today's date
OrganizerPosition(ORG_Organizer1, Today())
 
// Position the Organizer control on December 20, 2012
OrganizerPosition(ORG_Organizer1, "20121220")

Delete an appointment

OrganizerDeleteAppointment is used to delete:
  • the appointment selected in the control.
  • a specific appointment.
    // Deletes the first appointment
    OrganizerDeleteAppointment(ORG_MyOrganizer, 1)
OrganizerDeleteAll is used to delete all the appointments found in the Organizer control.

Modifying the display of the control

The current display of an Organizer control can be modified by the following functions:
Using the popup menu (AAF)
AndroidiPhone/iPad

Advanced use of events with procedure

You can also allow the user to define more precisely the characteristics of his appointment during an addition or a modification. To do so, create a window with the information to specify.
In the code, simply open the window in the event "Entry in edit in an appointment". To lock the direct input via the popup menu of the organizer, the event must return False.
This principle can be applied to all the events called by the popup menu of the Organizer control.
Example:
PROCEDURE Edit(aptEdited is Appointment)
 
// Opens the window for entering an appointment
// with the selected appointment (in Creation or Modification mode)
Open(WIN_InputAPT_HFSQL, aptEdited)
 
// Returns False to lock the direct input in the Organizer control
RESULT False
Managing bank holidays
The bank holidays are managed by programming. Several WLanguage functions (starting with BankHolidayXXX) are available.
To define the bank holidays displayed in the Organizer controls and in the Calendar controls, you must use BankHolidayAdd. This function allows you to define the list of bank holidays that will be used. This function allows you to customize the bank holidays according to the country and to the local regulations. This function must be used at the beginning of the application because it has a global effect on the application.
The bank holidays will be colored in green in the Organizer control.
Example:
// Delete all bank holidays
BankHolidayDeleteAll()
// Initialize the 11 bank holidays common to the French regions and to the French territories
BankHolidayAdd("0101") // 1st of January
BankHolidayAdd(bhEasterMonday) // Easter Monday
BankHolidayAdd("0501") // 1st of May
BankHolidayAdd("0508") // 8th of May
BankHolidayAdd(bhAscensionDay) // Ascension day
BankHolidayAdd(bhWhitMonday) // Whit Monday
BankHolidayAdd("0714") // 14th of July
BankHolidayAdd("0815") // 15th of August (Assumption)
BankHolidayAdd("1101") // All Saints' Day
BankHolidayAdd("1111") // 11th of November
BankHolidayAdd("1225") // Christmas
 
// Add 2 additional bank holidays for the regions of Moselle and Alsace
BankHolidayAdd("1226" + CR + bhGoodFriday)
Properties specific to the Organizer controls
The following properties are used to manage an Organizer control by programming.
Versions 17 and later
DirectInputAPT
New in version 17
DirectInputAPT
DirectInputAPT
The Property Direct InputRDV allows to know and indicate if the user can directly modify the title of an appointment in an Scheduler control or in an Organizer control.
Versions 15 and later
GranularityAppointment
New in version 15
GranularityAppointment
GranularityAppointment
The Property GranularityRendezVous makes it possible to know and modify the precision of the grid used by the Organizer control or Scheduler control to define appointments.. Property kept for backward compatibility.
Versions 16 and later
GranularityDuration
New in version 16
GranularityDuration
GranularityDuration
The Property GranularityDuration allows to know and modify the size of the grid used for the resizing:
  • the appointments of an Organizer control.
  • the appointments of a Scheduler control.
  • the events of a TimeLine control.
  • the tasks found in a Gantt Chart column.
Versions 16 and later
GranularityMovement
New in version 16
GranularityMovement
GranularityMovement
The Property GranularityDisplacement allows to know and modify the size of the grid for the displacement:
  • the appointments of an Organizer control.
  • the appointments of a Scheduler control.
  • the events of a TimeLine control.
  • the tasks found in a Gantt Chart column.
Versions 16 and later
MaskTitleDate
New in version 16
MaskTitleDate
MaskTitleDate
The MaskTitleDate property is used to identify and change the input mask used for the title of day columns in Organizer or Scheduler controls
Versions 15 and later
ModificationDurationAPT
New in version 15
ModificationDurationAPT
ModificationDurationAPT
The Property ModificationDurationRDV allows to know and indicate if the user can modify the duration of an appointment in an Scheduler control or Agenda.
Versions 17 and later
MovementAPT
New in version 17
MovementAPT
MovementAPT
The Property MoveRDV allows to know and indicate if the user can move an appointment in an Scheduler control or in an Organizer control.
Versions 15 and later
Num1stDayOfTheWeek
New in version 15
Num1stDayOfTheWeek
Num1stDayOfTheWeek
Num1stDayOfTheWeek is used to find out and modify the 1st day of the week displayed in:
  • a Calendar control.
  • an Organizer control.
  • a Scheduler control.
  • an edit control in Date format with Calendar.
Versions 17 and later
PeriodSelection
New in version 17
PeriodSelection
PeriodSelection
The Property PeriodSelection allows to know and indicate if the user can select a period in an Scheduler control or in an Organizer control.
Versions 15 and later
WorkingHourEnd
New in version 15
WorkingHourEnd
WorkingHourEnd
The WorkingHourEnd property is used to identify and change the end time of working hours used:
  • by an Organizer control.
  • by a Scheduler control.
  • by a Gantt Chart column (in a Table or TreeView Table control).
Versions 15 and later
WorkingHourStart
New in version 15
WorkingHourStart
WorkingHourStart
The WorkingHourStart property is used to get and change the start time of working hours used:
  • by an Organizer control.
  • by a Scheduler control.
  • by a Gantt Chart column (in a Table or TreeView Table control).
For a complete list of WLanguage properties that can be used with an Organizer control, see Properties associated with the Organizer control.
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment