Filter and sort list views

Overview

Filtering and sorting options enable you to organize the data that is presented in a list view. You can then, dependent on the permissions assigned to your role, save these custom list views so that they are easily accessible. 

Administrators have access to all list view functionality, but other roles have different levels of access depending on the custom permissions that have been set.

List views are made up of four key elements: 

  • The list view name.
  • The filters that are applied.
  • The sort order.
  • The columns that are presented.

Each different combination of these elements comes together to create a specific list view.

Filters

Use filters to restrict the data that is displayed. Filters are composed of three main elements: 

  • callout 1 The field. 
  • callout 2 The operator.
  • callout 3 The value.

The Filter menu with numbered callouts.

Filter logic

Multiple filters can be combined to refine which records appear in the list. Click Add filter to create additional filters.

When using the query builder to combine multiple filters, the AND operand is assumed. Alternate operands can be used in the advanced filtering mode. For more information, see Filter logic (advanced filtering) below. 

Filter fields

The fields available to use in a filter are all the standard and custom fields on the given object and any standard or custom fields on a directly related object. Fields from related objects are additionally prefixed with the related object’s name. For example, Contact > Name.

The Filter menu with the first dropdown menu expanded.

Filter operators

The list of available operators changes depending on the type of field you have chosen to filter by.

Field type Operators Value
Text, Text area, URL
  • is
  • is not
  • contains
  • does not contain
  • starts with
  • does not start with
Enter your filter term.
Number
  • equals
  • not equal to
  • greater than
  • greater than or equal to
  • less than
  • less than or equal to
Enter a number in the field or use the - and + buttons to choose a value.
Date
  • is
  • is not
  • is after
  • is on or after
  • is before
  • is on or before
Select is to display further date options: Specific date, Today, Tomorrow, Yesterday, Last week, This week, Nest week.

If you select Specific date, is not, is after, is on or after, is before, or is on or before, a calendar dropdown is displayed to allow you to select a date.
Checkbox, Picklist, Lookup
  • is
  • is not
Select the filter value from the dropdown list
Picklist with multi select
  • is
  • is not
  • is one of
  • is not one of
If you select is or is not, select a value from the dropdown list.

If you select is one of or is not one of, select one or more values from the dropdown list.
Time
  • equals
  • not equal to

Advanced filter logic

Click Switch to advanced in the Filter records modal to display the Lucene filter query view and enable the advanced query mode, which can be used to construct more sophisticated queries. Manually enter fields in the Lucene query filter window or select field references from the dropdown menu and copy them.

Filter queries should follow standard lucene query syntax.

lucene filter query mode on filter records modal.

For example:

Operand Definition
AND Finds records that match both values.
Region.Name:"San Francisco" AND JobStatus:"Pending Allocation"
OR Finds records that match either value.
Region.Name:"San Francisco" OR JobStatus:"Pending Allocation"
NOT Finds records that exclude values.
NOT(Region.Name:"San Francisco") AND JobStatus:"Pending Allocation"

Relative date filtering

Date math is supported in the same way as solr. Date math makes it easy to create times relative to fixed moments in time. 

Date math can start with either NOW, which treats the current point in time as a datetime, or a specific datetime following the format: 1972-05-20T17:33:18.772Z

Transform the NOW value between date or datetime values:

  • NOW:DATETIME = 1972-05-20T17:33:18.772Z
  • NOW:DATE = 1972-05-20

Add modifiers:

  • + adds a time period to the date.
    For example: NOW+5DAYS
  • - subtracts a time period from the date.
    For example: NOW-5DAYS
  • / rounds to the start of the given time period.
    For example:
    Start of the day: NOW/DAY Start of the month: NOW/MONTH

Time periods

The supported time periods are:

  • MILLISECOND or MILLISECONDS
  • SECOND or SECONDS
  • MINUTE or MINUTES
  • HOUR or HOURS
  • DAY or DAYS
  • WEEK or WEEKS
  • MONTH or MONTHS
  • YEAR or YEARS

Examples

  • Now: NOW
  • Start of the month: NOW/MONTH
  • Start of last month: NOW/MONTH-1MONTH
  • End of last month: NOW/MONTH-1MILLISECOND
  • Start of next week: NOW/WEEK+1WEEK
  • End of next week: NOW+2WEEKS/WEEK-1MILLISECOND

Filter on the current user

Query relative to the currently logged-in user by using $CurrentUser.

For example, if you want show only those items in the Jobs list that were last modified by the current user, enter LastModifiedById: $CurrentUser.UID in the advanced query builder.

searching by last modified

Further examples of queries using $CurrentUser:

  • RegionId: $CurrentUser.Resource.PrimaryRegionId — Show only items that are in the same region as the current user.

  • Category: $CurrentUser.Resource.Category — Show only items that have the same category (for example, Electrician) as the current user.

  • EmploymentType: $CurrentUser.Resource.EmploymentType — Show only items that have the same employment type (for example, full-time) as the current user.

$CurrentUser is not limited to the advanced query builder. If the filter permits the filtering of free text (for example, if it is not a pick-list or search box) it is also possible to use $CurrentUser. For example, the following filter on the Users list would find all Users that share your surname:

search by currentuser in the basic query modal

Sort

The Sort data modal enables you to change the displayed order of records. For example, a scheduler may want to see the most recently created jobs first.

The Sort data modal is made up of two elements: 

  • callout 1 The sort field.
  • callout 2 The sort order (ascending or descending).

The sort data modal with the options indicated by numbered callouts.

Columns

The Customize columns modal enables users to customize the fields displayed in the list view and change the order in which they are presented. 

An administrator must configure the fields available for use in a list view, but once configured, a general user can choose which ones are displayed and change the order in which they appear in the table.

The Customize columns modal is made up of four elements:

  • callout 1 A search to quickly find the columns you wish to display. 
  • callout 2 The columns available to be added to the list view.
  • callout 3 The columns that are currently selected for display.
  • callout 4 The display order of the columns.

The Columns menu with the columns option highlighted and numbered callouts.