How-To: Add Dynamic Filtering with Reports (Designing a Single Report Widget vs Multiple Date Driven

james_putnam
Kilo Contributor

Background before question:

I am new to ServiceNow but have been developing applications since the early 1990s, most recently (10+ years) with .NET C#. I could easily to the problem below in that environment and would expect it to be relatively simple to solve with ServiceNow.

 

Problem:

I want to design a Task Dashboard that has a total of 13 tabs, the first tab contains several report widgets that summarize the overall results for the Fiscal Year - mainly showing complete and incomplete tasks in total number in each category AND also bar charts with the x-axis showing months of the FY and y-axis showing the number. (So there would be 4 report widgets on the Summary Tab.) 

 

Each of the additional 12 tabs would be for each individual month in the FY. Each of the Monthly Tabs would be named "January", "February", etc... and have a Completions vs Incompletes (Complete field = true/false) semi-doughnut; Task Completion by Due Date broken down by several groups; Task Incomplete by Due Date broken down by several groups; and finally a List of Tasks that were not completed in the given month. (So 4 report widgets/tab.)

 

The easiest solution would be to design each basic widget and then clone them for each month, which would yield 48 widgets in all. This is NOT my goal, since the Task Due Date would be a filter used in each of these widgets. I would prefer to design 4 core widgets, which do not have the Task Due Date filter set, but instead would have these programmatically set when each month tab is clicked. The widget would have JavaScript add the dynamic report condition for the Task Due Date added as an "AND" condition where the "Task Due Date between StartofMonth EndofMonth".

 

With .NET, I would simply be able to have the query against the database modified when the tab loads/is clicked based on the Tab's name.

 

So, I have asked several ServiceNow developers I have worked with on this and they do not believe this functionality is possible, because they have not worked to this fine level of detail with what they have been tasked to develop - I would like to get an answer to this to advance all of our skills and reduce the number of report widgets currently being used within our portal.

I believe that I have to use dynamic filter options and program the JavaScript to properly implement this functionality. I do not know how to (with JS)  get the Tab Name that is active; how to add the correct filter; and also trigger this when the tab is clicked. Sp, any assistance in this matter would be great!

 

Thank you for your assistance and suggestions with this.

0 REPLIES 0