Tutorial: Calendar by user

1- The table that will be used to execute the calendar must be previously created by the database administrator.

<code> 
CREATE TABLE `calendario` (
`chave` INT(11) NOT NULL DEFAULT '0',
`titulo` VARCHAR(50) DEFAULT NULL,
`descricao` text,
`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;
</code>

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.

Options

- 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.

Tutorials in the same category

Tutorial: Cloud File Management

Some of the data storage services are ready to securely read and store files and images from your S...

Tutorial: Guardar Vista de la Consulta

En este ejemplo, veremos las opciones disponibles para que el usuario final almacene, en sesión o ...

Shortcut Keys

In this tutorial, we will see how you can use or create shortcut keys in a Grid application. 1 -...

Calendario Responsivo

En este tutorial crearemos una aplicación de calendario responsivo Calendario en Navegador ...

Comment this post