Automatically Filter Report Homepage

//Automatically Filter Report Homepage

Automatically Filter Report Homepage

I
just figured out a cool little reporting feature today that might end up helping somebody. On the reports homepage (‘report_home.do’) in Service-now.com, users have the ability to type filter text to restrict the types of reports that they see. So, if I wanted to see just those reports on the ‘Change request’ table, I could simply type ‘change request’ for my filter text as shown below…

Now for the cool part… This filter text can actually be passed over a URL as a parameter to automatically bring a user to a filtered report homepage view. This might be useful if you wanted to create a UI action on the change request table that brought the user to the change request reports when clicked for example.
The parameter is ‘sysparm_reportquery’ and is used like this in a URL…

To navigate to the report homepage without navigation (filtering on ‘change request’)
https://demo.service-now.com/report_home.do?sysparm_reportquery=change request

To navigate to the report homepage with navigation (filtering on ‘change_request’)
https://demo.service-now.com/nav_to.do?uri=report_home.do?sysparm_reportquery=change request

Filtering on additional report attributes with a hidden background filter

You can also use the regular ‘sysparm_query’ parameter just like you would in a module or filter definition to filter a list of records. This might be useful for filtering on other attributes on the report definition. For example, if I wanted to show a list of just Pie Chart reports in the system WITHOUT having my query appear in the filter box, I could set up my report page URL like this…
https://demo.service-now.com/nav_to.do?uri=report_home.do?sysparm_query=type=pie

By | 2018-07-09T15:00:08-06:00 July 23rd, 2010|Categories: Reporting|7 Comments

About the Author:

7 Comments

  1. Magda November 24, 2011 at 1:33 am - Reply

    It’s helpful. 🙂
    I wonder what I could put in query if I wanted something from filter.
    for example filter is
    Stage is achieved

  2. Pranav May 5, 2012 at 10:25 am - Reply

    Is there any way we can sort reports page in alphabetical order of Tables?

    • Mark Stanger May 5, 2012 at 12:57 pm - Reply

      No way that I’m aware of. The report page can’t really be modified unfortunately.

  3. Adam June 23, 2014 at 6:45 am - Reply

    Is there a way to make the url something dymanic, i.e. only show reports where the current user has permissions to see them?

    • Mark Stanger June 23, 2014 at 6:51 am - Reply

      You’re pretty much limited to a text filter as far as I know. Displaying only reports where the user has permissions is the standard behavior though so you shouldn’t need anything different to do that.

  4. william October 8, 2015 at 4:56 am - Reply

    Very good trick guys.
    But on some instance it doesn’t seem to work.
    Any idea why? Is there any system properties about this?

    thanks

Leave A Comment