Skip to tutorial content
Rate module Not yet rated

Creating Custom Tables

3 min read
On this page

In this lesson, you will learn:

  • When to create a custom table
  • How to create one, step by step
  • What ServiceNow creates for you automatically

1 When you need a new table

SNWR’s Facilities team wants to track meeting room bookings. No table in ServiceNow fits. Time to create a custom table. πŸ—οΈ

Before you do, ask:

  • Does a table already exist for this? (Check first!)
  • Is this a kind of work? Then extend Task, so it gets assignment, states, and SLAs for free.
  • Is it a thing IT manages? It may belong in the CMDB (Chapter 44).

⚠️ Heads up: Custom tables can affect your company’s license. Many ServiceNow contracts limit how many custom tables you can create. Check with your ServiceNow owner first.

2 Create a table

A new table form. 1: Label, Room Booking. 2: Name, filled in automatically as u_room_booking. 3: Extends table, Task, so it inherits task fields. 4: Create module, checked, and Add module to menu, SNWR Facilities. 5: Auto-number, with prefix RB and number 1000. A Columns related list shows the new fields: Room, Booking date, and Attendees. After Submit, ServiceNow creates the table, its fields, a module, and roles.
Figure 1. A new table. ServiceNow fills in the name and can build the menu for you.
  1. Go to System Definition > Tables and click New.
  2. Type a Label, like “Room Booking”. The Name fills in by itself: u_room_booking.
  3. Pick Extends table if it should have a parent, like Task.
  4. Tick Create module and pick a menu, like SNWR Facilities, so people can find it.
  5. Open the Controls tab and turn on Auto-number with a prefix, like RB (Lesson 29.4).
  6. Add your own columns (fields) in the Columns related list.
  7. Click Submit. βœ…

3 What ServiceNow creates for you

  • πŸ—„οΈ The tablewith system fields
  • πŸ”‘ Roleslike u_room_booking_user
  • πŸ”’ Access controlsbasic security rules
  • 🧭 A moduleif you ticked it
  • πŸ“ A form and listdefault layouts
  • πŸ”’ Numbersif auto-number is on

πŸ’‘ Good to know: Always open the new table’s form after creating it, and tidy the layout with Form Layout (Lesson 14.1).

⭐ Remember: Check for an existing table first. If it’s work, extend Task.

4 Let’s try it: Room Booking

  1. Create the table Room Booking, extending Task, with a module in SNWR Facilities.
  2. Add columns: Room (String) and Booking date (Date).
  3. Submit. Refresh the All menu and open your new module.
  4. Create a booking. Does it have Assignment group and State? (From Task!)

5 Quick recap

  • Create tables in System Definition > Tables
  • The name is filled in automatically with a u_ prefix in global scope
  • Extend Task for work, so you inherit its features
  • ServiceNow creates roles, access controls, and a module for you
  • Custom tables may affect licensing

6 Check yourself

Think of your answer first. Then tap to check.

1 Your new table tracks work that needs assignment and states. What should it extend? Show answer

Task.

2 Name two things ServiceNow creates automatically with a new table. Show answer

Any two of: roles, access controls, a module, default form and list layouts, system fields.

3 Why check before creating a custom table? Show answer

A table may already exist, and custom tables can affect licensing.

Nice work! You finished this lesson. πŸŽ‰

Was this lesson helpful?

Have a question or doubt?

Ask here and get help from instructors and fellow learners.

0 / 300

Only logged-in learners can post.