TUESDAY, FEBRUARY 07, 2012

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

Comments

Posted On
Nov 24, 2011
Posted By
Magda

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

Posted On
Nov 26, 2011
Posted By
Mark Stanger

You can do that as long as you target a specific report using the ‘sysparm_query’ parameter. I’ve built an example of this using a calendar report in a popup. Check out this post for details.
http://www.servicenowguru.com/scripting/client-scripts-scripting/ci-change-calendar-macro/

Leave a Reply


Notify me of followup comments via e-mail. You can also subscribe without commenting.

Latest Comments

  • Mark Stanger: This functionality doesn’t connect to an FTP server. See this line in the post above…...
  • Mark Stanger: The report page is back-end XML so there’s no way to directly manipulate the behavior of that...
  • Mark Stanger: Due to some ServiceNow limitations, the localhost MID server option had to be removed.
  • Matt Haak: Is it possible to use this with the local Mid Server (mid.server.localhost) It appears from this community...