Finding Information in Lists
|Note: The latest release that this documentation applies to is Fuji. For documentation on the Geneva release, see Search a list. Documentation for later releases is also on docs.servicenow.com.|
Users can quickly find information in a list by searching, sorting, and grouping the list.
2 Searching a List
The list title bar includes options for searching the list. Administrators can enable text searches for any list.
To search a list:
- Select a field (for Go to) or select for text (for Search).
- Enter the search text and press Enter or click the search icon ().
- Go to: for most fields, sorts by the selected field and returns records where the field value is equal to or greater than the search term. For the Number field, which is a string type field, finds the records that have a number ending with the number that you enter. For example, searching a list of incidents by selecting Number and entering 4 shows records with numbers like INC0000004 and INC0000014.
- Search: returns records that contain the search term in any field.
Use wildcards to further refine list searches.
2.1 Searching Individual Columns
In addition to searching by field or for text, you can also search individual columns in a list. This search supports queries that include AND, but does not support OR. This feature is available in UI14 starting with the Eureka release.
- Expand the column headers and add a search field to each column by clicking the search icon () beside the personalize list icon ().
- To search a single column, enter the search text in the desired column search field and press Enter.
- You can also use wildcards to further refine column searches. For example, use the * to define a contains search.
- The search returns records that match the search term.
- To search multiple columns, do one of the following:
- Enter the search text in each of the desired column search fields and press Enter.
- Search an individual column and then search additional columns based on the results of the first search.
- Each time you enter search criteria in a column search field and press Enter, the results will narrow.
To clear a column search:
- Delete the text in the search field for the desired column and press Enter. This returns results for any remaining column search criteria.
- Delete the text in all of the column search fields to return all records in the list.
3 Sorting a List
To sort a list, use one of the following methods:
- Click a column name to sort the list in ascending order. Click again to sort in reverse order.
- Right-click a column name and select Sort (a to z) or Sort (z to a) to sort in ascending or descending order, respectively.
- Specify a sort order with a filter. Filters provide for sorting by more than one column (for example, by Category and then Subcategory). To learn more, see Using Filters and Breadcrumbs.
The current sort order is indicated by an arrow next to the column name (, up for ascending and down for descending). Only the primary sort order is indicated. Note that you cannot sort a list by an array-based field, such as a Glide list.
3.1 How Lists are Sorted
Consider the example record "Requested Item [sc_req_item]".
- The label for the record is "Requested Item"
- The value of the record is "sc_req_item"
3.1.1 Choice List Fields
A choice list is a type of field that lets the user select from a pre-defined set of choices. Choice list fields are sorted by the value of the field, not by the label for the field. The example record would be sorted with other records whose values start with "s" because the value of the field is "sc_req_item". This sorting behavior can be useful: The choices for the State of tasks, for example, are ordered new -> work in progress -> closed. If the sort were based on the label, it would be closed -> new -> work in progress. For additional detail, see Integer values for default choice lists.
3.1.2 All Other Field Types
Other field types are sorted based on the label. The example record (if it were not a choice list type) would be sorted with other records whose values start with "r" because the label is "Requested Item".
4 Grouping Items in a List
Grouping aggregates a list by a field and displays the record count per group. Grouping can help you find data quickly by organizing and providing a summary of search or filter results. For example, this picture shows active incidents grouped by caller.
To group items in a list, use one of these methods:
- On the title bar, click the context menu and select Group By. Select the field by which to group the list. To remove a grouping, select -- None --.
- Right-click the column name and select Group By. To remove a grouping, select Ungroup.
To use a grouped list:
- Groups are named the values of the field selected for grouping.
- Record count per group appears next to the group name.
- The total number of items in the list (all groups combined) appears just below the paging controls in the list. This is shown only when the list is grouped on a field.
- To expand or collapse a group, click the arrow () next to the group name.
- To expand or collapse all groups, click the arrow at the top of the list.
- To open the full list for a group, click the group name.
- The maximum number of records shown per group is the number of records per page in list view.
- To see all records for a given group, open the full list.
- To change the number of records per page, click the title menu and select Show.
- The maximum number of groups shown is 100 by default, but may be configured by an administrator.