Exercise: Filtering Records in the List View
Objective: Practice filtering records in the list view:
Mastering the list view is one of the more critical skills for new ServiceNow users. In this first List View exercise, we’ll focus on different ways of filtering records.
Exercise
-
In your Personal Developer Instance, navigate to Incident > All
-
Using the list header search, find all Incidents containing the Short Description SAP (Learn more about the list header search)
-
Locate the list header search next to the New button in the list header
-
Change the dropdown selection to Short description
-
Type *SAP in the Search field
-
Press the enter key on the keyboard
-
Observe that the list has been filtered to show only items where the Short Description contains the text SAP
-
Use the context menu to show only the current items where the State field is In Progress (Learn more about the list context menu)
-
Find a record where the State is In Progress
-
Right click the In Progress text in the record’s State column
-
In the context menu that is displayed, click Show Matching
-
Observe that the list has been filtered to show items where the Short Description contains the text SAP and are also in the In Progress State
-
Use the Remove next condition icon (>) to remove the Short description contains SAP condition in the filter breadcrumbs (Learn more about the filter breadcrumbs)
-
Locate the filter breadcrumbs next to the filter icon
-
Hover over the right angle bracket (>) before Short description contains SAP
-
Observe the hover text says Remove next condition
-
Click the right angle bracket (>)
-
Observe the Short description contains SAP condition is removed from the filter.
-
Use the filter condition builder to add a condition that shows only Critical Priority Incidents (Learn more about the filter condition builder)
-
Click the filter icon to open the condition builder
-
Observe that the State condition is still applied
-
Click the And button next to the State condition
-
Select Priority from the –choose field– dropdown
-
Select 1 - Critical from the third dropdown in the new condition
-
Click the Run button
-
Observe that the filter breadcrumb and list of Incidents have updated to reflect the changes to the filter conditions
Review
List Header Search
The list header search is a quick way to perform simple text searches on the currently displayed list. It allows selecting a specific field to search or selecting for text to perform a search across all searchable fields.
The search also supports a few wildcards to assist with particular types of searches such as starts with or contains. Here is a list of the wildcards available using the SAP search text as an example:
- *SAP: Contains the text SAP
- %SAP: Ends with the text SAP
- SAP%: Starts with the text SAP
- SAP: Is exactly the text SAP
- *!SAP: Does not contain the text SAP
- !=SAP: Is not the text SAP
List Context Menu
The list context menu provides a number of actions that can be performed against a specific row or field in the list view. When a user right clicks a value in the list view, the context menu takes note of the field and the value clicked. In this exercise we explored the Show Matching capability but it is worthwhile to explore some of the other more frequently used options on your own:
Filtering Options add a condition to the end (right) of the filter:
-
Show Matching: Filters to show records where [field] IS [value]
-
Filter Out: Filters to show records where [field] IS NOT [value]
-
Show After: Filters to show records where [date field] >= [value]
-
Show Before: Filters to show records where [date field] <= [value]
Clipboard options are a quick way to copy information about a record:
-
Copy URL to clipboard: Copies to your clipboard the web address that will navigate directly to the form view of the record
-
Copy sys_id: Copies to your clipboard the unique id for the record
Filter Breadcrumbs
The filter breadcrumbs show the current filter that is applied to the list view. The breadcrumbs appear simple but hide a significant amount of powerful behavior. The actions you can explore on the filter breadcrumbs include:
-
Remove a filter condition - Click the right angle bracket (>) before any condition to remove it
-
Remove all filter conditions after a selected one - Click any filter condition to remove all the conditions after it (to the right)
-
Copy filter to clipboard - Right click any filter condition and click Copy Query to copy the encoded query, the text representation of the query, for the conditions up until the selected one. This is used extensively by Admins and Developers on ServiceNow.
-
Copy the URL to clipboard - Right click any filter condition and click Copy URL to copy the web address to the current list with the filter applied. This is helpful for sharing links with coworkers.
-
Open list in new window - Right click any filter condition and click Open in new window to open the list in a new window
Filter Condition Builder
Mastering the filter condition builder is an absolute MUST! Whether a user, an admin, or a developer, nearly everyone will spend most of their time filtering lists in ServiceNow using the condition builder. Additionally, the condition builder is seen throughout ServiceNow in many different ways from reports to setting conditions and rules for different scripts.
Most of ServiceNow is driven by filtering and matching lists of records based on conditions and then taking action on the filtered list, so spend as much time as you can getting accustomed to using this tool.
There are many buttons and actions we did not cover in this particular exercise that are worth exploring. Here is a list to summarize what the filter condition builder can do:
Buttons:
-
Run: Executes the currently set filter and returns the filtered list of records
-
Save…: Saves the current filter, allowing a user to save a personalized list of filters that can be accessed through the list view’s hamburger menu at the top left corner
-
AND: Allows the user to specify multiple conditions which must all be matched for a result to be included in the filtered list
-
OR: Allows the user to specify multiple conditions, one of which must match for a result to be included in the filtered list
-
Add Sort: Allows the user to sort list view results by a specified field
-
Delete (X): Allows the user to remove specific filter conditions from the condition builder