This wizard guides you through the process of creating a new custom table. In each step, you need to perform the required configuration as described below and click Next to proceed to the next step.
In the first step, you are asked to fill in the following details:
•Custom table display name - name of the custom table displayed in the system's user interface.
•Custom table code name - name of the custom table object used by developers in project code. The code name is always preceded by a namespace, which allows you to have different tables of the same name used in different contexts.
In the second step, you can choose from two basic options:
•Create a new database table - choose this option to create a brand new table in the system's database.
•Database table name - the actual name of the table in the system database. A name in the <namespace>_<code name> format is pre-filled automatically.
•Primary key name - primary key column name, pre-filled with the ItemID value.
•Use an existing database table - choose this option if you already have a physical table in the system database and want to register it in the system.
•Database table name - the actual name of the table in the system database. The drop-down list offers only database tables which are not part of the default Kentico CMS database schema and are not yet registered for any object.
•Primary key name - primary key column name. The original table's primary key column is used automatically.
In addition to the choices above, you can use the check-boxes below to determine which of the default fields should be included in the table:
•Include ItemGUID field - globally unique ID of the particular custom table data record.
•Include ItemCreatedBy field - user name of the user who created the item.
•Include ItemCreatedWhen field - date and time of when the item was created.
•Include ItemModifiedBy field - user name of the user who last modified the item.
•Include ItemModifiedWhen field - date and time of last modification.
•Include ItemOrder field - order of the item when table content list is displayed. The lower number, the earlier position in the list.
In the third step, the field editor is displayed. It lets you define which columns will be included in the database table, and edit properties of the already present columns.
In Step 4, you only have to select on which websites will the custom table be available. Use the Add sites button to add required websites to the list, or the Remove selected button to remove already listed websites selected by the check-boxes next to them.
Step 5 offers you to configure indexing of data in the custom table by the Smart Search module.
In the top part, you can specify how items from this custom table will be displayed in search results:
•Title field - specifies which field will be used as the title of the result item.
•Content field - specifies which field will be used for the content extract of the result item.
•Image field - specifies which field will be used for the image of the result item.
•Date field - specifies which field will be used for the date and time displayed with the result item.
Lines of the table in the bottom part of the page represent fields defined on the Fields tab, while columns define the following:
•Content - if checked, content of the field will be indexed and searchable the standard way.
•Searchable - if checked, content of the field will be searchable in format <field code name>:<searched phrase>, which searches only through the fields and not through the other fields.
•Tokenized - indicates if the content of the field should be processed by the analyzer when indexing; the general rule is to use this for Content fields and not for Searchable fields.
•Custom search name - relevant for Searchable fields; substitutes field code name in the <field code name>:<searched phrase> expression; if entered, the original code name can't be used.
For more information about settings in this step, please refer to Developer's Guide -> Modules -> Smart search -> Obejct settings.
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.
Detailed information about the Custom tables module can be found in Developer's Guide -> Modules -> Custom tables.
A complete example of creating a sample custom table is available in Developer's Guide -> Modules -> Custom tables -> Creating a new custom table.