Tables in ServiceNow,
In ServiceNow,
Survey – User Groups
User Administration – User Roles
Table having mapping of user and role
You can find Group Role by writing Group Role in Navigation Panel as below,

Get a list of group members by writing sys_user_grmember.list in navigation panel as below,

If you write sys_user.list in Navigation filter , and Enter, You will find a list of all users.

List Of Users :

We can find a table name by 2 ways


2. Table name can find in URL ,

What is context menu?
To Create Application Menu ,
Go To Application Menu in Navigation panel as shown in the picture below.

To Create new application, Click on New Button ,as shown in below picture

While creating an Application,if Role is not assigned it means everyone can access this application. (Refer above figure)
Application can be said as a container of modules.
Every application contains Modules.
Modules are used to access the functionality of ServiceNow,these functionalities are dependent on tables.
To create Modules ,search Module in Navigation Panel.

Click on New Button to create new Module, as shown in above picture

Write Module Name and Application Name under which we want to add Module, as shown in below picture,.
E.g Module Name as Contains Role Module,
Application Name : LTI Training
Instead of writing Application Name directly,You can select it from the list by clicking on the search button in Application Menu option.

Visibility Tab :
Override application menu roles :
Allows users to access this module even if they do not have permission to view the containing application menu. Users must still meet the role requirements for this module.
Link Type :
Link type field specifies what type of link the module opens.
We can find a lot of link types,as shown in the picture below.

Table : Number of table can be seen under Table,

For now, Take table name as sys_user_role_contains and click on Submit,as shown in the picture below.

So now,if you search LTI Training in a navigator filter, you can see it with the module which we have added previously.
(See Below Picture )

If you click on that module you will see all the contained role list.

We can Edit Application by clicking on Pencil near Application name as shown in below picture.

we can find related modules at the bottom of the form. (See the picture below)

In above Picture,
If you click on New Button near Modules,a new form will be generated for new module and Application Name will be automatically displayed.

Write Module Name,Link Type and Table name and Click on Submit button,as shown in above picture.
See below picture for URL link type example.(_blank is used to open that link in new window)

Note : If you assign any role to user then that user need to logout and login again to get that access.

You can give an order to a module ,Double click below Order for the required module.( as shown in above picture,)

Link type field on the Module form specifies what type of link the module opens.
4 types of tables :
By default present in the system. Can be accessed by admin.
e.g sys_user, sys_user_role
Existing tables starting with their own name.
Can be accessed by any user that has given this role .
e.g incident, problem,change_request.
Table created by user according to their requirement. Table name starts with “u_”
It is also a system table.It is a combination of 2 or more tables. Table name starts with “v_”.
All tables in ServiceNow are stored in sys_db_object table.
To create a new Table , write Table in navigator filter.
You will find Tables under System Definition . Click on the New button to create a new table.

Clicking on New Button,below form will be displayed,

In below section of table,you find 3 tabs ,
Columns,Controls and Application Access

In Controls Section,
Extensible is used to say whether this table is extensible or not.Means if you want to create child tables from this table then check that checkbox.
Auto-number is used if we want any auto number in this table. If we check this checkbox,system will generate a number automatically in this table.
Once you submit this form,a table will be created.
The system will create 6 columns automatically when any table is created,you can see in below picture.

Sys_ID : Every Record has Sys_ID.
Click on “Insert a new row..” below default 6 columns, to create a new column.
We can add fields using form layout or list layout.
We can manage columns to be displayed on the form using the Form Layout option in Configure Option of the Table.


To create child table from the existing table,First set Extensible property of existing table as true by checking the checkbox Extensible and then create a new derived table.,as shown in below picture

Child of the above table can be created as shown in below picture.

Search Role in Navigator filter,You will find Roles in a list.
Click on Roles.The following list will be displayed.

Click on New button to create new Role.
The following form will be displayed.

Fill the required values,Check the Elevated privilege checkbox as true and save,as shown below.

After login into the instance User will not get this Role directly.You need to apply that Role to the User like below ,


Metadata of the field.
Form annotations are additional pieces of information on a form, such as a line or paragraph of text. Use form annotations to provide on-screen instructions to your users.

To assign annotation,
) and select Configure > Form Layout.
For example, select the Text annotation type, the HTML data type, and enter <span style=”color:red”>Select the primary location:</span>. The text appears red on the form.
Note :
(
When you create any table ,it will be saved in the server of ServiceNow (SQL Database) and then it displayed on the frontend.
If you consider any web application , the frontend will be same for client and for developer also,but the Roles are different.
)


(
Tables are inserted as a record in sys_db_object.
Application Menu is related to sys_app_application table.
)
Tables and Columns :
Schema Map : can see what are the inherited tables or parents table.
By default we have a Task table in a system which is a parent of a lot of tables.


To create a view ,open any table in form layout.
Right click ->Configure -> Form Layout
Configure the table as below,
To create a View Go in Form View and Section,

Write View Name by clicking New in View Name Dropdown list,

Click on New ,pop up will be displayed,

Remove the fields that don’t want to display in View as below,


Click on Save button to save the changes.
Now, Record can be seen in View as below,
Open any Record in form layout as below,

Click On View option to select the ViewName as below,

After selecting the View, the record will be displayed according to the structure of that view as below,
