Filter Reports via URL Parameters in Lightning Experience

No need to futz with filters! Pass URL parameters to set filter values in Lightning Experience reports. When linking to reports or when bookmarking a report, add filter value parameters to the URL to customize how the report filters when opened. For example, bookmark your opportunities report and add a filter value parameter to specify whether you see New Business or Existing Business.This feature is new in Lightning Experience.

Periodically throughout your day you check your opportunities report, and after opening it, you always edit a filter to show New Business or Existing Business. (The Type filter includes both New Business and Existing Business by default.)

Report without filter value URL parameter

Instead of loading the report, editing the filter, and reloading the report, create two bookmarks. One with a filter value parameter for New Business, and one with a filter value parameter for Existing Business. Take note of the opportunities report URL.

https://na1.salesforce.com/one/one.app#/sObject/00OR0000000PCHYMA4/view?t=1479844235107

Edit the URL to set the Type filter value to New Business by appending the parameter &fv0=New%20Business. The full, bookmarked URL reads:

https://na1.salesforce.com/one/one.app#/sObject/00OR0000000PCHYMA4/view?t=1479844235107&fv0=New%20Business

Let’s take a closer look at what the parameter means.

  • & — Denotes a new parameter in the URL. If no other parameters are present in the URL, then substitute ? in place of &.
  • fv0 — The fv stands for “filter value,” and is the name of the parameter. The 0 is the numerical order in which the filter appears in the report. (The first filter is 0, the second filter is 1, the third is 2, and so forth.) Standard filters don’t count in this order, and can’t be filtered using URL parameters, although they appear as the first three filters on any report. To set the value of the fifth filter in the report, specify fv4. In our example, we’re filtering the first field filter in the report, the Type filter.

    The order in which filters appear in Lightning Experience on the report run page isn’t necessarily the order that filters appear in the report. Locked filters are listed beneath unlocked filters on the run page, but aren’t necessarily ordered after all the unlocked filters. To see the order of filters in your report, refer to their order in the Report Builder. Alternatively, make a GET call to /services/data/v39.0/analytics/reports/<report ID>/describe and note their order in the JSON response.

  • =New%20Business — Specifies that the Type filter value is New Business.

    The parameter value must be URI encoded, which means certain characters (such as spaces) must be written in a format that URLs can understand. In our example, the space (‘ ‘) between “New” and “Business” becomes %20 when URI encoded.

When you navigate to your opportunity report through the URL with a filter value parameter, the report opens filtered and ready to read.

Report with a filter value URL parameter
Take note of these limitations to setting filter values via the URL.

  • Only field filters support edits from URL parameters. Standard filters (role hierarchy filters, scope filters, date filters), cross filters, and row limit filters aren’t supported. Standard, cross, and row limit filters don’t count when listing filters — fv0 is the first field filter.
  • Chart filters aren’t supported.
  • Filter operators (like equals and greater than) can’t be modified via URL parameters.
  • You can’t change the field being filtered via URL parameters.
  • You can’t add new filters to reports using filter value URL parameters. You can only modify existing filters.
  • You can’t delete filters from reports using filter value URL parameters. Setting a blank value filters by no text or numerals, but doesn’t remove the filter.

CREDIT: https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_rd_reports_filter_url.htm

9 thoughts on “Filter Reports via URL Parameters in Lightning Experience”

  1. Nice blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple adjustements would really make
    my blog jump out. Please let me know where you got your theme.
    Thanks ps4 games allenferguson ps4 games

  2. Hi there to all, the contents existing at this web page are actually amazing for people experience, well, keep up the
    nice work fellows. games ps4 allenferguson games ps4

  3. Hi to every body, it’s my first go to see of this website; this web site contains amazing and in fact fine
    stuff designed for visitors.

  4. This is very interesting, You’re a very skilled blogger.

    I have joined your feed and look forward to seeking more of your wonderful post.

    Also, I’ve shared your website in my social networks!

  5. Hello there, I discovered your website by the use of Google while looking for a comparable subject, your
    website came up, it seems to be good. I’ve bookmarked it in my google bookmarks.

    Hello there, simply changed into alert to your weblog through Google, and located that it is truly informative.
    I’m gonna watch out for brussels. I’ll appreciate when you continue this in future.
    Numerous folks might be benefited from your writing. Cheers!

  6. I was excited to find this page. I want to to thank you
    for your time due to this wonderful read!! I definitely savored every bit of
    it and I have you saved as a favorite to check out new information on your website.

  7. Hi, I do think this is a great site. I stumbledupon it 😉 I’m going to revisit yet again since i have
    book-marked it. Money and freedom is the greatest way to change, may you
    be rich and continue to help others. asmr 0mniartist

Comments are closed.