Additional queries and examples

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

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.

If this field is empty, the page opens in the content frame, which is
the default behavior.

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

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.

Apply the desired filter, sort order, and grouping.

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.