Skip to content

CodeWithLuwam/July-2-ServiceNow-Tables-and-Schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

ServiceNow-Tables-and-Schema

ServiceNow: Tables, Columns & Schema — Step‑by‑Step Guide

Goal: Create a custom table Asset Recovery Request that extends the Task table, add it to the HR Administration menu, add required fields, submit a test record, and view the schema map.


Table of Contents


Before You Start

  • Navigation path names: Application Navigator (All)System Definition
  • Label vs Name: The Label is what users see in the UI; the Name is the system name (e.g., task), typically auto‑generated.
  • Everything is a record: Fields (columns) are stored as Dictionary records. You’ll sometimes see the header Dictionary Entry when creating/editing a field.

Find the “Table of Tables” (System Definition → Tables)

  1. In the Application Navigator (All), type Tables.
  2. Click System Definition → Tables. This is the "table of tables" where each record represents a table.
  3. Click New to create a new table record (UI actions like Create Table, Create Application, Browse Applications, Edit Table, Schema map, Delete all records appear on table records).

Explore Tables & Columns

  1. From System Definition, open Tables & Columns to browse tables and their fields.
  2. Tables are listed alphabetically. You’ll often see a display like Task [task] → first is Label, second (in brackets) is the Name.
  3. On the right, you’ll see Columns for the selected table. Field‑type icons indicate the data type (reference, choice, string, date/time, etc.).

Open the Task Table

  1. In Tables & Columns, locate Task [task] (alphabetical list).
  2. Observe the Columns panel on the right. This table has many baseline fields that downstream tables inherit.

View the Schema Map

  1. With Task selected (or open its table record), click Schema map.
  2. The yellow highlight indicates the current table you’re viewing.
  3. Tables on the left are derived from (extend) Task. Each box is a table; arrows/lines represent inheritance relationships.

A schema is essentially the skeleton of a table: the table name, its columns (fields), and how it relates to parents/children.


Create the Asset Recovery Request Table (extends Task)

  1. Go to System Definition → Tables and click New.

  2. Fill in the Table form:

    • Label: Asset Recovery Request (the Name will auto‑populate as u_asset_recovery_request).
    • Extends table: search/select Task (use the lookup 🔍 if needed).
    • Create module:checked.
    • Add module to menu: select HR Administration.
  3. Click Submit.

After submit, you can return via the History stack to your new table record (e.g., Table – Asset Recovery Request).

How this shows in the All menu:

  • Application Navigator (All)

    • HR Administration (application)

      • Asset Recovery Request (module — name equals the table label)

Add the Module to HR Administration

If you checked Create module and selected HR Administration, this is already done. If not:

  1. Open your Asset Recovery Request table record.
  2. Under Module, click Add to menu and choose HR Administration.
  3. Save.

Add Required Fields (Columns)

You can add fields inline in the Columns related list, or by clicking New to open the full Dictionary Entry form. Both are valid.

Option A — Quick add in Columns related list

  1. On your Asset Recovery Request table record, scroll to Columns.
  2. Double‑click the row that says Insert a new row….
  3. Enter Column label and select Type; click the green check ✅ to save the row.

Option B — Full Dictionary Entry form

  1. In Columns, click New.
  2. Complete the form, then Right‑click → Save (keeps you on the page) or Submit.

Fields to add

Your table already inherits many fields from Task. Add the custom fields below:

  1. Employee

    • Type: Reference → User (usually sys_user)
    • Purpose: Who the asset belongs to.
  2. Asset Type

    • Type: Choice
    • Choices: Laptop, Monitor, ID Card
    • After Save, click Choice list specification to add choices. You can include a — None — option if desired.
    • Tip: Set explicit Value entries for each choice so the field doesn’t default to an unintended option.
  3. Asset Tag

    • Type: String
    • Purpose: The physical/assigned tag or serial.
  4. Recovery Status

    • Type: Choice
    • Choices: Pending, Recovered, Lost
  5. Return Due Date

    • Type: Date/Time

🔎 The lookup (magnifying glass) helps you select target tables for Reference fields and available Types.


Show Fields on the Form & the List

Make the new fields visible to users on both the Form and List.

Form Layout

  1. Open Asset Recovery Request → New to see the form.
  2. Right‑click the header → Configure → Form Layout.
  3. Move Employee, Asset Type, Asset Tag, Recovery Status, Return Due Date into the Form Layout. Save.

List Layout

  1. Open the module HR Administration → Asset Recovery Request to see the list view.
  2. Right‑click the header row (column titles) → Configure → List Layout.
  3. Add the same fields to the list view. Save.

Submit a Test Record

  1. Use the Asset Recovery Request module → click New.
  2. Fill out Employee, Asset Type, Asset Tag, Recovery Status, Return Due Date.
  3. Click Submit. Confirm the record appears in the list with your selected columns visible.

View Your Table’s Schema Map

  1. Open the Asset Recovery Request table record (via System Definition → Tables, search by label/name).
  2. Click Schema map.
  3. Note the yellow current table highlight and the inheritance line from TaskAsset Recovery Request.

Notes, Tips & Glossary

  • Inheritance: Child tables extend parent tables and inherit their columns 1:1. Your custom table extends Task, so it inherits Task’s baseline fields (you’ll see dozens of pre‑populated columns).

  • Customize vs. Inherit: Only add fields that aren’t already inherited—avoid creating duplicate fields.

  • Baseline terms:

    • Base table: Has no parent.
    • Core: Comes with baseline (out‑of‑box) implementation.
    • Custom: Added in your instance (non‑core).
  • Relationships: You’ll encounter patterns like one‑to‑many, many‑to‑many, reference, and extended relationships; schema map helps visualize them.

  • Choice lists: After creating a Choice field, configure its Choice list specification to add labels/values and decide if — None — should appear.

  • Saving: Right‑click → Save keeps you on the form; Submit saves and returns.


Troubleshooting

  • Don’t see your module? Verify the Create module box was checked and HR Administration is selected as the menu. Clear browser cache or use a hard refresh if the nav hasn’t updated.
  • Field not on form/list? Re‑open Configure → Form/List Layout and add the field; check that it was created on the correct table (not the parent).
  • Reference target missing? Ensure you selected the correct Reference table (e.g., User/sys_user) via the lookup.

What You Learned

  • Navigate System Definition to discover tables and columns.
  • Read schema maps and understand inheritance (Label vs Name; current table in yellow).
  • Build a child table extending Task, add a module, define fields, and expose them on forms and lists.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published