Loading

Configuring Lists

From ServiceNow Wiki
Jump to: navigation, search
Note
Note: The latest release that this documentation applies to is Fuji. For documentation on the Geneva release, see List administration. Documentation for later releases is also on docs.servicenow.com.

Contents

1 Overview

Users with the appropriate roles can configure various aspects of lists. For example, users can add or remove columns from a list and change the order in which the columns appear in the list. Users can also hide controls and define access conditions by role for existing controls. Configuration changes apply to all users.

Note
Note: Configuring a list in this way modifies the list for all users. To make changes to a list that are only visible to you, see Creating Personal Lists.


2 Configuring Lists

Configuring lists is called personalizing lists in versions prior to the Fuji release. To configure a list, right-click the list header and select Configure (Personalize in versions prior to Fuji). This opens a context menu with the following list options:

  • List Layout: Choose which columns appear in the list, create list views, and create new fields on the table.
  • List Calculations: View a summary of the minimum and maximum values for the selected column.
  • List Control: Configure how these elements work on a list: filters, links, list editing, and control buttons such as the New button.

2.1 Configuring the List Layout

Users with the personalize_list role can configure the list layout.

  1. Open the list in the view you want to modify.
    For example, to modify the incident mobile view, navigate to Incident > Open and select View > Mobile from the context menu.
  2. Right-click the header and select the appropriate option for your version:
    • Fuji or later: Configure > List Layout
    • Eureka or earlier: Personalize > List Layout
  3. Use the slushbucket to select the columns and the order in which you want them to appear.
    The first non-reference field automatically links to the form view of the record. For this reason, consider using the record number as the first column in the list layout.
Note
Note: If you create a personal list and then configure the list view differently, the changes do not appear until you reset your personal list to column defaults.


2.1.1 Adding Extended Fields to Base Table Lists

Administrators can configure a property that controls whether or not fields on extended tables can be added to base table lists. For example, you can view and filter on the caller_id field from the Incident table on a Task table list, such as the My Work list. Enabling this property does not show the extended table fields in the personalize list.

  1. Navigate to System Properties > UI Properties.
  2. Locate the property Allow base table lists (task, cmdb_ci, etc.) to include extended table fields (incident_state, os_version, etc.), and allow filtering on extended table fields (glide.ui.list.allow_extended_fields).
  3. Select the check box to enable extended fields on base table lists. Clear the check box to disable the feature.
  4. Click Save.

2.2 Configuring List Calculations

Users with the personalize_list role can configure list calculations. You can configure list calculations for multiple columns in the same list. All users can see configured list calculations.

  1. In a list of records, right-click the header of a numeric column you want to evaluate.
  2. Select the appropriate option for your version:
    • Fuji or later: Configure > List Calculations
    • Eureka or earlier: Personalize > List Calculations
    A dialog box appears, enabling you to view minimum and maximum calculations for that field for all the records in the list.
    Configuring list calculations

  3. Select one or more of the following list calculation options:
    • Total value (not available for string, date, or date/time fields)
    • Minimum value
    • Maximum value
    • Average value (not available for string, date, or date/time fields)
  4. Click OK.
    The calculations appear below the last record in the column. If the list is grouped, in addition to the overall calculations at the bottom of the list, group calculations appear below the last record in each group.
Note
Note:
  • List calculations apply only to the view of the list in which they are configured.
  • List calculations are available in list reports.


2.3 Configuring List Controls

Users with the personalize_control role can configure list controls. A number of elements in a list can be configured, such as control buttons and filters. Right-click a list column header and select Configure > List Control (Personalize > List Control in versions prior to Fuji). The List Control form appears (see table for field descriptions).

Configuring list controls

Note
Note: The list controls that are available for embedded lists are more limited. Unless otherwise noted, the list control fields in the following table are available for both standard and embedded lists.


Field Description
Table View the name of the table for the list or related list. For example, Change Request [change_request]. This is automatically set by the system.
Related List View the name of the table and field that define the related list. For example, sysapproval_approver.sysapproval. This is automatically set by the system.
Label Enter the label you would like for this list. Allows an admin to customize the label for a related list or list. If not supplied the default plural label for the file is used. For example, the label for the Incident table would be Incidents.
Omit new button Select the check box to prevent the global New button from displaying on this list. Clear this check box if you want the New button to appear on this form, or if you want to control the New button with roles (New roles field). This does not omit the New button that an ESS user sees in the Incident list, where the New button is an overriding UI Action specific to the Incident list and not the global New button.

This field is available for standard lists only.

Omit edit button Select the check box to prevent the Edit button from displaying on this list. Clear this check box if you want the Edit button to appear on this form, or if you want to control the Edit button with roles (New roles field). Note that the Edit button does not apply to all lists.

This field is available for standard lists only.

Omit if empty Select the check box to omit the Related List from the form entirely (no header) if there are no entries for the Related List.
Omit columns if empty Select the check box for a top-level list to omit the column headers AND filters/breadcrumbs for an empty list.
Omit filters Select the check box to display filters or breadcrumbs for this list. Clear this check box if you always want filters or breadcrumbs or if you want to control filters/breadcrumbs with roles (Filter roles field).

This field is available for standard lists only.

Omit links Select the check box if you want links for fields that reference other files in this list. Leave this button unchecked if you always want links to be generated or if you want to control the use of links with roles (Link roles field).
Omit drill-down link Select the check box to disable the link to the record from the first column in list view. Users can still click the reference icon to access the record.

This field is available for standard lists only.

Hierarchical lists Inserts a hierarchical list into a record list. This enables a user to view the contents of a record's related lists without leaving the record list form.

This field is available for standard lists only.

List edit type Controls the ability of a user to edit values directly in individual cells in a list. The options are:
  • Save immediately (cell edit mode): enables cell editing. The entire row is saved as soon as the user enters a new value.
  • Save data by rows: enables cell editing. The row is saved only when the user navigates away from the row or clicks the Save (Save row.png) button. This mode allows the user to modify multiple values before saving a record.
  • Disable list editing: prevents users from editing cells in the list.

This field is available for standard lists only.

List edit tag Enter an arbitrary string of letters or numbers to create a unique tag that is sent to a reference qualifier as the script variable listEditRefQualTag.
List edit insert row Select the check box to enable or clear the check box to disable the ability for a user to create new records in list view. When it is enabled, an empty row appears at the bottom of the list.
Inserting a new row, which creates a new record


This field is available for standard lists only.

New roles Specify the user roles that can access the New button on this list. Leave the field blank to enable all users to access the New button. Note that this option does not apply to embedded lists, which do not contain New buttons.
Edit roles Specify the user roles required to have the Edit button appear in the list.

This field is available for standard lists only.

Filter roles Specify the user roles required to have the filter appear in the list.

This field is available for standard lists only.

Link roles Specify the user roles required to have links generated for fields that reference other files.

2.4 Example of Configuring a List

This example shows how to modify a related list of incidents on the Problem form. It changes the label for the related list to Child Incidents and removes the New button to prevent users from creating new incidents from the Problem form.

  1. Navigate to a problem record.
  2. Right-click the header of the embedded Incidents list and select the appropriate option for your version:
    • Fuji or later: Configure > List Control
    • Eureka or earlier: Personalize > List Control
  3. On the List Control form, change the Label field to Child Incidents.
  4. Select the Omit new button check box.
  5. Click Submit.
Modifying list controls for a related list

In the problem record, the label for the embedded incident list has changed, and the New button is no longer available. The Edit button remains.

Modified related list

3 Creating Advanced Controls with Scripts

You can also write scripts to specify if the various elements, such as links, filters, new buttons, and edit buttons, should be present or not. These scripts can react to the record that is being displayed. For related list controls, the parent record is identified by the global variable parent. For primary lists, there is no parent record.

Configure the List Control form and add the script field that you need:

  • Omit Columns Condition: Omit column headings if there are no conditions.
  • Omit Edit Condition: Omit the Edit button.
  • Omit Empty Condition: Omit the list header if there are no conditions.
  • Omit Filter Condition: Omit the list filter.
  • Omit Links Condition: Omit related links.
  • Omit New Condition: Omit the New button.

In these script fields, if the script evaluates to true, the item is omitted. The following script is an example that you can use on the Affected CIs related list to show only the Edit button if the parent task is active. This script is placed in the Omit Edit Condition script field.

var answer;
if(parent.active == true){
  //Do not remove the 'Edit' button
  answer=false;
}
else{
  //Remove the 'Edit' button
  answer=true;
}
answer;

3.1 Configuring List UI Actions

You can create a UI action that opens the slushbucket interface to customize lists in the list view from System UI > Views or System UI > Lists. To create this UI action:

  1. Navigate to System UI > UI Actions.
  2. Click New.
  3. For the Table field, select the List [sys_ui_list] table.
  4. Also select the List context menu check box and make sure the record is active.
  5. Copy and paste the following script into the script field.
var url = "slushbucket.do?sysparm_form=list&sysparm_list=" + current.name + "&sysparm_view=" + current.view.name;
url += "&sysparm_collection=" + current.parent + "&sysparm_collection_relationship=" + current.relationship; 
url += "&sysparm_referring_url=sys_ui_view.do?sys_id=" + current.view.toString();
action.setRedirectURL(url);
Configuring list UI actions

4 Enhancements

4.1 Fuji

  • In the list column context menu, the Personalize option is relabeled Configure.
Was this article helpful?
Yes, I found what I needed
No, I need more assistance
Views
Personal tools