LogiUpSkill

Application Menu and Module in Service-now

Tables in ServiceNow,

  1. Create Users : sys_user (Table )
  2. Create Roles : sys_user_role (Table )
  3. Assign a role to user : sys_user_has_role (Mapping Table (User – Role) )
  4. Create Group : sys_user_group (Table )
  5. Add user in a Group : sys_user_grmember ( Mapping Table)
  6. Assign a Role to Group : sys_group_has_role (Mapping Table)
  7. Add one Role into another Role : sys_user_role_contains (Mapping Table)

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,

application menu and module in servicenow

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

application menu and module in servicenow

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

  1. Configure table

2. Table name can find in URL ,

What is context menu?

Application 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.

Module :

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.

Link Type URL example :

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 Types Explanation :

Link type field on the Module form specifies what type of link the module opens.

Assessment

Links to the assessment-based survey you select in the Assessment reference field.

Content Page

Displays the content page you select in the Content page reference field.

Documentation Link

Links to a documentation page and opens in a new tab or window. This link type is used with embedded metadata in documentation topics. To open an internal document from a module, use the URL (from Arguments) module link type.

Homepage

Displays the homepage you select in the Homepage reference field.

HTML (from Arguments)

Places HTML in the application navigator. This link type is used for more complicated links, where a flat URL is not customizable enough.

Note:

  • The HTML (from Arguments) link type is supported in UI15 and UI11 only. In UI16, use the URL (from Arguments) link type instead.
  • Enter a value for the Arguments field.

List Filter

Displays an unpopulated list view for the table you select in the Table field. Allows users to specify a filter without loading the list first. Use the Filter field to define the default filter for the list. Use the View name field to specify a 

List of Records

Displays the list view for the table you select in the Table field. Use the Filter field to define the default filter for the list. Use the View name field to specify a view.

Map Page

Displays the map page you select in the Map page reference field.

New Record

Displays a form for creating a record in the table you select in the Table field.

  • Use the View name field to specify a view.
  • Use the Arguments field to apply a template.

Run a Report

Runs the saved report you select in the Report field.

Script (from Arguments)

Runs a script, as defined in the Arguments field.

Note: Enter a value for the Arguments field.

Search Screen

Link that displays a blank form for searching records in the table. Use the View name field to specify a view.

Note: Use the parameter &sysparm_result_view=view_name to define the view the results are rendered in.

Note: All searches use a [starts with] query to search for matching text. Other query types are not supported in search screens.

Separator

Creates a division between modules. Enter a name in the Title field to add a section name that users can collapse or expand.

Single Record

Displays a form for a single record on the table. Use the View name field to specify a view.

Survey

Links to the legacy survey you select in the Survey reference field. Use the Survey overwrite check box to determine whether the survey can be taken multiple times.

Note: The Survey link type is for use with legacy surveys only, which assessment-based surveys replace. Select the Assessment link type to link the module to an assessment-based survey.

Timeline Page

Displays the timeline page you select in the Timeline Page reference field.

URL (from Arguments)

Opens any URL, as defined in the Arguments field.

[Optional] Use the Window name field to define a link that opens in a new window.

Note:

  • For internal links, always use a relative link such as ./catalog_home.do?sysparm_view=catalog_default or catalog_home.do?sysparm_view=catalog_default. Do not use an absolute link to a ServiceNow instance. It creates problems when you move an update set from a development instance to a production instance because the URL still references the development instance.
  • Enter a value for the Arguments field.

Types Of Tables in ServiceNow :

4 types of tables :

  1. System table :

By default present in the system. Can be accessed by admin.

e.g  sys_user, sys_user_role

  1. Out of Box Table :

Existing tables starting with their own name.

Can be accessed by any user that has given this role .

e.g incident, problem,change_request.

  1. Custom Table / User defined table :

        Table created by user according to their requirement. Table name starts with “u_”

  1. Virtual Table :

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.

Create 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.

Elevated Role in ServiceNow :

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 ,

Annotations in ServiceNow :

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,

  1. Navigate to a form.
  2. Click the context menu icon (Context menu icon) and select Configure > Form Layout.
  3. Under Form view and section, select a section.
  4. In the Available list, double-click * Annotation to move it to the Selected list.

    The Annotation Details section appears. Annotation details 

  5. Place it above the field to annotate.
  6. In Annotation Details, select the type of annotation. The available types of annotations include Info Box Blue, Info Box Red, Line Separator (any text you add appears beneath the line), Section Details, Section Separator, and Text.
     Form annotation types
  7. Select either Plain Text or HTML for the data type and enter the annotation in the text box. All valid HTML tags are supported.

    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. 

  8. Click Save.

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.

)

 Table Structure Details :

Dictionary :

  • This is the table sys_dictionary  that contains the list of fields. (all columns of all tables)
  • When we create a column in any table it will store in a Dictionary also and we can also create a column for any particular table through Dictionary Entry.(see below picture)

  • If Type is Collection then that entry/record represents a table record in Dictionary Entries else all are columns or fields.(see below picture)

(

Tables are inserted as a record in sys_db_object.

Application Menu is related to sys_app_application table.

)

Form View in ServiceNow :

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.

Create View :

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,

Application Menu and Module in Service-now