0% found this document useful (0 votes)
2 views11 pages

Table Class Notes

The document provides an overview of tables in ServiceNow, explaining their structure, purpose, and creation process. It details the differences between parent and child tables, the importance of the sys_id and Number Maintenance, and outlines best practices for table creation. Additionally, it lists common field types and includes interview questions related to ServiceNow tables.

Uploaded by

ssravanr392
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views11 pages

Table Class Notes

The document provides an overview of tables in ServiceNow, explaining their structure, purpose, and creation process. It details the differences between parent and child tables, the importance of the sys_id and Number Maintenance, and outlines best practices for table creation. Additionally, it lists common field types and includes interview questions related to ServiceNow tables.

Uploaded by

ssravanr392
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Join WhatsApp Group ➔ [Link]

com/FsTKFQRWE3U7GbDXkASscT
YouTube Channel ➔ [Link]
For ServiceNow Batch Details Contact ➔ 8209080823
Course Content ➔ [Link]

ServiceNow Table
What is a Table in ServiceNow?
A Table in ServiceNow is a database object that stores records (rows) and fields (columns).
Just like an Excel sheet:
• Table = Excel Sheet
• Row = Record
• Column = Field

Example
Incident Table
Number Short Description State Caller Priority
INC0010001 Email not working Open John High
INC0010002 VPN issue In Progress David Medium

Here,
• Incident = Table
• Each incident = Record
• Number, State, Caller = Fields

Why Do We Create Tables?


We create a new table when ServiceNow does not already have one for our business requirement.

Example 1
Company wants to manage:
• Employee Assets
• Gym Membership
• Vehicle Requests
• Training Requests
If no suitable table exists, create a new custom table.

Example 2
A company wants to maintain Laptop Warranty details.
Fields:
• Warranty Number
• Laptop Name
• Purchase Date
• Expiry Date
• Owner
Create:
u_laptop_warranty
Where Do We Create a Table?
Navigate to
System Definition

Tables

New
OR
System Definition

Tables & Columns

When Should We Create a New Table?


Create a new table when:
• Existing table cannot fulfill the requirement.
• Data belongs to a completely new business process.
• Separate security is required.
• Separate workflows are required.
• Separate reports are required.
• Separate forms are required.
Do NOT create a new table if an existing table already satisfies the requirement.

Table Naming Convention


Custom tables always start with
u_

Example
u_employee_assets
u_training_request
u_company_vehicle
u_vendor
u_gym_membership

What Happens When a Table is Created?


ServiceNow automatically creates:
• Database Table
• Default Form
• Default List
• Table Schema
• Default System Fields
• Sys ID
• ACL placeholders (if required)
Default Fields Created Automatically
Every new table automatically gets these system fields.
Field Purpose
sys_id Unique identifier
sys_created_on Record creation date
sys_created_by Created by
sys_updated_on Last updated date
sys_updated_by Last updated by
sys_mod_count Number of updates

These six fields are present in almost every table.

Other Common System Fields


Depending on configuration, tables may also include:
• sys_class_name
• sys_tags
• sys_domain
• sys_scope
• sys_package

What is sys_id?
Every record gets a unique 32-character ID.

Example
7e3ab67f1b22301045c2ed3dcf4bcb12
It never changes.
Even if Number changes, INC0010001, sys_id remains the same.

What is Number Field?


The Number field is a human-readable identifier.

Example
INC0010001
CHG000034
RITM001245
TASK001567

Users search using Number.


ServiceNow internally uses sys_id.

Number Maintenance
Number Maintenance generates numbers automatically.

Navigate
System Definition

Number Maintenance
Why is Number Maintenance Used?
Automatically generates sequential numbers.

Example
Without Number Maintenance
INC1
INC2
INC3
Someone has to enter manually.

With Number Maintenance


INC0010001
INC0010002
INC0010003
Generated automatically.

Number Maintenance Configuration


Example

Prefix
INC

Digits
7

Next Number
10001

Output
INC0010001
INC0010002
INC0010003

Parent Table
A Parent Table contains common fields that can be inherited by child tables.

Example
Task
Task is the parent table.
Contains fields like
• Number
• State
• Assigned To
• Assignment Group
• Priority
• Work Notes
Child Table
A Child Table inherits everything from the parent.

Example
Incident
Problem
Change
Catalog Task
HR Task

All extend Task.

Table Hierarchy
Task

├── Incident

├── Problem

├── Change Request

├── Catalog Task

└── HR Task
All inherit Task fields.

What is Extends Table?


When creating a table, there is an option Extends Table, It means "Inherit all fields from another
table."

Example
Create
Vehicle Request
Extends
Task
Immediately gets
• Number
• State
• Assigned To
• Priority
• Opened By
• Work Notes
without creating them manually.
Benefits of Extending a Table
• Code Reusability
• Common Fields
• Standard Process
• Easy Reporting
• Better Maintenance
• Less Development

What is Table Hierarchy?


Hierarchy shows
Who is Parent
Who is Child

Navigate
Table

Show Schema Map
or
Table Hierarchy

Types of Fields in ServiceNow


Many field types are available.
Below are the most commonly used ones.

1. String
Stores text.
Example
John
Laptop
Network Issue

2. Integer
Whole numbers.
Example
10
500
2500

3. Decimal
Stores decimal values.
Example
25.75
18.50

4. Float
Stores floating-point numbers.
Example
15.345
5. Email
Valid email addresses.
Example
john@[Link]

6. Phone Number
Stores phone numbers.
Example
+91-9876543210

7. URL
Stores website links.
Example
[Link]

8. Boolean (True/False)
Checkbox.
Values
True
False

9. Choice
Dropdown.
Example
Open
Work In Progress
Resolved
Closed

10. Reference
Stores reference to another table.
Example
Caller
references
sys_user
Assignment Group
references
sys_user_group

11. Date
Only date.
05-Aug-2026

12. Date/Time
Stores date and time.
05-Aug-2026
10:45 AM
13. Time
Stores only time.
09:30 AM

14. Currency
Stores money.
$250
₹1500

15. Duration
Stores elapsed time.
2 Days
5 Hours

16. Journal Input


Used for
• Work Notes
• Additional Comments
Maintains history.

17. HTML
Stores HTML content.

18. Translated Text


Supports multiple languages.

19. Password
Hidden field.

20. Image
Stores images.

21. Attachment
Stores uploaded files.

22. Glide List


Allows selecting multiple records from another table.
Example:
Select multiple users, groups, or CI records in a single field.

23. Domain ID
Used in Domain Separation.

24. Conditions
Stores encoded queries/conditions used in filters.
Table Configure Settings
Open
System Definition

Tables

Open Table

Common configuration options include:


Setting Purpose
Label Display name of the table
Name Database table name
Extends Table Parent table to inherit from
Application Application scope
Create Module Automatically create navigation module
Auto Number Enable automatic record numbering
Access Controls Control record security
Allow Web Service Expose table through APIs
Allow Configuration Allow forms/lists to be customized
Audit Track field changes
Journal Track journal fields (Work Notes/Comments)
Live Feed Enable activity feed
Text Index Include records in global search
Auto Complete Enable predictive search
Update Synonyms Update search synonyms
Table Rotation Rotate large log tables
Extension Model Defines table inheritance behavior
Read Only Prevent record updates
Schema Map View parent-child relationships
Attributes Store additional table-level properties

Note: The exact options may vary depending on the ServiceNow release and plugins installed.

Table vs Record vs Field


Item Meaning Example
Table Database object Incident
Record Single row INC0010001
Field Column State
Value Data inside a field Open
Parent vs Child Table
Parent Table Child Table
Stores common fields Inherits parent fields
Can have many children Has only one direct parent
Promotes reusability Adds table-specific fields
Example: Task Example: Incident

Table Creation Best Practices


• Use an existing table whenever possible instead of creating a new one.
• Extend an appropriate parent table (such as Task) to reuse standard functionality.
• Follow the u_ prefix for custom tables.
• Use meaningful labels and table names.
• Create only the fields required by the business.
• Use the correct field type (Reference, Choice, Date, etc.) based on the data.
• Enable Audit for important business data.
• Configure Auto Numbering when a readable record number is required.
• Avoid storing duplicate information; use Reference fields to relate data across tables.
• Design the table hierarchy carefully before creating custom child tables.
Interview Questions
1. What is a table in ServiceNow?
A table is a database object that stores records (rows) and fields (columns).

2. What is the difference between a parent table and a child table?


A parent table contains common fields and functionality, while a child table inherits those fields and
adds its own specific fields.

3. What is the purpose of the Extends Table option?


It enables table inheritance, allowing a new table to automatically reuse the fields, business rules, and
functionality of its parent table.

4. What is sys_id?
A unique 32-character system-generated identifier for every record. It never changes.

5. What is Number Maintenance used for?


It automatically generates sequential record numbers such as INC0010001 or RITM0001234.

6. Name some commonly used field types.


String, Integer, Decimal, Boolean, Choice, Reference, Date, Date/Time, Email, Phone Number, URL,
Currency, Duration, Journal Input, HTML, Password, Image, Glide List.

7. Which system fields are created automatically for every new table?
• sys_id
• sys_created_on
• sys_created_by
• sys_updated_on
• sys_updated_by
• sys_mod_count

These fields help ServiceNow uniquely identify records and track their creation and update history.

You might also like