Additional queries and examples

The administrator can append queries to the List of Records module link type value. The URL (from Arguments) link type can be used to provide a custom filter or open the page in a new window.

Appending queries to list view modules

For List of Records module link types, you can append additional queries to the module to further define the filter for the returned list. For example, to filter active incidents that are assigned to the currently logged in user, use the following argument query:
active=true^assigned_to=javascript:gs.user_id()

Example URL module that opens in a new window

You can configure a module to open an external URL in a new browser window.

Before you begin

Role required: admin

Procedure

  1. Open the application menu record using one of the following methods.
    • Navigate to System Definition > Application Menus and select the application menu from the list.
    • Point to the application menu and click the edit application (pencil) icon. This action is possible in Istanbul UI16 only.
    • Right-click the application label in the application navigator and select Edit Application. This action is possible in UI15 and UI11 only.
  2. Scroll down to the Modules related list and click New.
  3. If the Window name field is not displayed, configure the form and add this field.
  4. Select URL (from Arguments) from the Link type list.
  5. Add the complete web address to the Arguments field.
  6. Select an icon for the module in the Image field.
  7. Enter _blank in the Window name field.
    If this field is empty, the page opens in the content frame, which is the default behavior.
    Module form

Example URL module that opens a list with a custom filter URL

To create a module that opens a list with a custom filter, sort order, and grouping, use a link type of URL (from Arguments) and create a link to a custom URL.

Before you begin

Role required: admin

About this task

Use the following shortcut to determine the arguments for your custom URL.

Procedure

  1. Navigate to the list by URL, without loading it in the standard interface.
    For example, navigate to the Incident list by entering <base URL>/incident_list.do.
  2. Apply the desired filter, sort order, and grouping.
  3. Copy the resulting URL from the browser address bar.
    For example, if you apply a filter of active=true with an ascending sort on priority, a descending sort on opened_on, and grouped by assignment_group, the address bar reads: incident_list.do?sysparm_query=active=true^EQ^ORDERBYpriority^ORDERBYDESCopened_at^GROUPBYassignment_group
    Note: Do not copy the base URL (the http://instance_name.service-now.com/ portion). Always use a relative link to prevent problems when you move an update set from a development instance to a production instance.
  4. Define a module with a Link type of URL (from Arguments).
  5. Paste the custom URL from step 3 into the Arguments field.
  6. Click Submit.
    The module now opens the custom list in the content frame.