1- The table that will be used to execute the calendar must be previously created by the database administrator.
CREATE TABLE `calendario` (
`chave` INT(11) NOT NULL DEFAULT '0',
`titulo` VARCHAR(50) DEFAULT NULL,
`inicio` datetime DEFAULT NULL,
`final_data` DATE DEFAULT NULL,
`final_hora` TIME DEFAULT NULL,
`recorrencia` CHAR(1) DEFAULT NULL,
`periodo` CHAR(1) DEFAULT NULL,
`users` VARCHAR(15) DEFAULT NULL,
PRIMARY KEY (`chave`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
2- Select the table fields that will be used in the application.
Items with * are required to create the application. The other fields are only used for additional agenda information.
- Id: Used to identify the record, select the primary key field from that table. (Int (11)) - Title: Used to store the subject of each activity that will be displayed in the application. ((Varchar (50)) - Start date: The activity start date will be recorded. * (Date or datetime) - Start time: The start time of the activity will be recorded. * (Date or datetime) - End date: The end date of the activity will be recorded. * (Date or datetime) - End time: The end time of the activity will be recorded. * (Date or datetime) - Recurrence: Used to state whether the event will repeat in a month, week or day. (Int) (1) - Period: Used to state the recurrence type of recurrence: month, week or day. (Int) (1)
If you have a datetime type field in the database, you can list the date and time options using the same datetime field in the database. The application will take the two values and concatenate them before saving to the database.
3- Edit the “USERS” field, select “Defined value” and enter the name of the global variable [var_login]
4-Use this field as a parameter to receive the value of the global variable
Use the following condition in the WHERE clause of the Calendar application:
5- Create a Control application
6- Create a field to inform a specific user
Enter the number of fields
7- Change the field label
8- Create a Link to the Calendar application
Create new Connection
9- Choose application options
10- Select Calendar
11- Pass the field as a parameter to the Calendar
Run the Control. Whenever we inform a user in Control, the Calendar will display only that user’s activities.