Suzanne Smith
ServiceNow Employee
ServiceNow Employee

Chances are, you are going to need to create a custom table at some point. For example, if you are creating custom applications, you'll need to create a custom table. Tables are a collection of database records. A table contains rows representing records and columns representing fields. Administrators can create custom tables as needed. The process for creating a custom table is pretty straightforward.

 

How to create a custom table:

 

  1. Navigate to System Definition > Tables.
  2. Click New.
  3. Enter a Label to appear on list and form views.
  4. Edit the text in the Name field as necessary.
    Text is automatically added to the Name field based on the Label field. The "u_" prefix indicates a custom table and cannot be edited or deleted.
  5. The User role is the role required to access the new table. Edit the User role field as necessary.
    A new role is automatically added to the User role field based on the Label field. You can edit the name text (including the "u_" prefix) or select a completely different user role for the table.

    custom_tables1.jpg

  6. Click Submit.

 

 

Here are some tips when creating custom tables:

 

  1. A new custom table can extend an existing table. For example, users often create tables that extend the Task table. (The Incident, Problem, and Change tables all extend the Task table.) The new table automatically incorporates all fields on the original table. Note that it is not possible to extend system tables or database view tables. To easily determine the table of origin for all fields, personalize the Table Columns list by clicking the gear and adding the Table column:custom_tables2.jpg

  2. Select the Extensible option when you create the table to make it possible to extend the table later. Of course, clearing this option ensures that child tables cannot be created from the table. (If you created child tables and then clear the Extensible option, the existing child tables remain.)

    custom_tables3.jpg

  3. Consider adding Live Feed to the form header of your table. This enables a live feed group for the table so users can work on tasks collaboratively through the live feed interface. Any messages that users post in the live feed are automatically added as comments or work notes on the record. To add live feed, select the option on the Table record. The Live Feed button appears on the module and the Activity Stream displays messages:
    custom_tables5.jpg
  4. Add columns (fields) directly from the table record when creating a new table or editing an existing one. In the Table Columns list, double-click Insert a new row. Add information to the Column label field and the remaining fields in the row. To save the changes, save the Table record.

    custom_tables6.jpg

 

Community conversations about custom tables

 

 

If you are still experiencing issues creating a custom table, John Andersen has created a quick demo that shows how you can create a table in the database and then create fields for that table through a base table as well as custom fields.

4 Comments