Managing custom tables

The administration interface for custom tables management is located in Site Manager -> Development -> Custom tables.

 

clip0064

 

The top part of the page is a filter. You can filter displayed custom tables by Display name, Code name and Table name. You can also Edit (Icon_Edit) or Delete (Icon_Delete) the listed records. Creating a new custom table is also done here and is described in the following example:

 

 

New Custom table wizard

 

In the following example, we will create a new custom table using the New custom table wizard. It will be a simple table for storing information about people. Their first names, last names and dates of birth will be stored in the table.

 

1. Go to Site Manager -> Development -> Custom tables.

 

2. Click the New Custom table link.

 

3. The New Custom table wizard starts. On the first step of the wizard, you are asked to fill in the custom table's display name and code name. The code name is always preceded by a namespace which allows you to have different tables of the same name used in different contexts. Enter the following details:

 

Custom table display name: People
Custom table code name: customtable.People

 

and click Next to continue.

 

clip0040

 

4. In the second step, you are asked to fill in the database table name. A name in the format <namespace>_<code name> is pre-filled automatically. The primary key name cannot be changed by default. Using the check-boxes below, you can determine which of the default fields should be included in the table. The meanings of the fields are the following:

 

ItemCreatedBy - user name of the user who created the item
ItemCreatedWhen - date and time of when the item was created
ItemModifiedBy - user name of the user who last modified the item
ItemModifiedWhen - date and time of last modification
ItemOrder - order of the item when table content list is displayed; the lower number, the earlier position in the list

 

Leave default values for all parameters and click Next to continue.

 

clip0041

 

5. In the third step, the field editor that you should be already familiar with is displayed. Create three fields with the following parameters:

 

Attribute name: FirstName
Attribute type: Text
Attribute size: 100
Field caption: First name
Field type: Text box

 

Attribute name: LastName
Attribute type: Text
Attribute size: 100
Field caption: Last name
Field type: Text box

 

Attribute name: DateOfBirth
Attribute type: Date and Time
Field caption: Date of birth
Field type: Calendar
Edit time: unchecked

 

When you are finished, click Next to continue to the following step.

 

clip0043

 

6. On Step 4, you only have to select by which sites will the custom table be used. Check the Corporate Site check-box and click Next.

 

clip0044

 

7. The fifth step gives you an overview of what has been done automatically. To finish the wizard, click Finish. You will be redirected back to the list of custom tables in Site Manager -> Development -> Custom tables.

 

clip0045