Pivot Table - Custom reporting

rajacool
Kilo Explorer

Hello Guys!!  

i have question. I am trying to create a Pivot table of resolved tickets with respect Assigned to and category for a specific month. Which i am able to do. But can i add option in report to choose different months?? Example : when i create the pivot table report and give filter condition "Closed" on "Last month", i get data for last month. But i want to have option in the report where i can select any month on list of values, say APRIL 16 or MARCH 16 instead of changing filter condition to view specific month data?? Is it possible??

Thanks,Raj

3 REPLIES 3

tltoulson
Kilo Sage

Hi Rajasegar,



Yes, you can definitely create Reports with an interactive filter condition.   There is a newer feature in ServiceNow called Interactive Filters.   I personally have not used it yet, so I don't know if it will work for you or how it works.   Here is the ServiceNow docs page that can help you implement this technique: Interactive Filters on homepages and dashboards



If this doesn't work, there is a technique that I have been using successfully for a few years to accomplish this, you will definitely need moderate development skills to make this work:



1.   Create a Dynamic Filter Option that reads a date stored in a User Preference of your choosing (gs.getUser().getPreference('preference name'))


        - This filter option will now provide a dynamic query for your report based on the value stored in the User Preference


        - Be aware, you may need to play with this to get the script to provide a value that the query likes


2.   Create a Report that uses the Dynamic Filter Option on the Date field of your choosing


        - This makes the Report dependent on the User Preference


3.   Create a UI Page that provides a dropdown for your date selection.   The scripts on the page need to provide a couple actions:


        - On change of the date value (or on submit if you use a submit button), set the User Preference from Step 1 to the selected value (gs.getUser().savePreference()) then refresh the homepage


4.   Make the UI Page a Homepage Widget: Creating a Custom Homepage Widget - ServiceNow Wiki


5.   Add the Report and the new Widget to your homepage



If you've wired the scripts properly, changing the value in your date selector will update the report on the homepage.   If not, use your client and server logs to debug where the scripts are going wrong.


Hi Travis,



How were able to get the dynamic filter to be available for Date fields in filters? We have added a dynamic filter, but do not get the option to choose is(dynamic) when building a filter with Date fields.


Hey Johnny, sorry for the late reply, if I remember correctly you can set it up by going the Report record and modifying the filter's encoded query directly for date fields.   This may require a background script to accomplish.   It's not as straightforward as other field types on the Dynamic Filter Options but since you only have to set it up once, its not so bad.