Display reports to end user based Created date and end user should be able select the date for which day he wants to view.

siddharth1
Tera Contributor

Hi All,

I want to show a report like how many cases are opened on a specific date and I am able to get it But for end-user I like to provide a date picker on the report itself so that the user can use the date picker and select the date and the respective opened ticket on that specific day should be displayed on the report.

I am trying to achieve this using Dynamic content block but I want to know how can I fetch the user input and compare with the 'created' on dates of report in jelly. 

1 REPLY 1

Community Alums
Not applicable

Hi siddharth,

You could create your own custom interactive filter (https://docs.servicenow.com/bundle/rome-now-intelligence/page/use/dashboards/concept/c_CustomPublishers.html?cshalt=yes).

To give you a head start, please find attached an update set that will create

-a new widget type ("Custom Interactive Filters") in which you can list for which dates you want to have interactive filters

and  

-a UI macro ("interactive_date_filter") that will generate the interactive filters as listed within the new widget type.

The result in the UI looks like this:


ServiceNow 2016-11-10 14-38-55.png


So like when in the condition builder, you can select:

-the date (A) to use in the filter,

-the operator (B) to apply,

-the operands (C) to set. The operands are of course dependent on the operator selected.

When developing or troubleshooting interactive filters, consider to add the "Debug homepage filters" (D) on your dashboard.

You could also have an interactive filter for which the date is fixed, so a user is not troubled by selecting the right date. It looks like:


ServiceNow 2016-11-10 14-49-48.png


Now, the user can only select the operator and operands.

To add the custom interactive filters to a dashboard when using the attached update set, it will look like this (with the responsive canvas plugin in Helsinki turned on):


ServiceNow 2016-11-10 14-53-59.png


So a new type/category of widgets (E), showing the dates as listed (F) in the new widget types.

In the new widget type ("Custom Interactive Filters"), you can list multiple dates for which you want interactive filters available in a 'condition builder' look and feel. It looks like this for the two interactive filters from screenshot above:


Custom Interactive Filters _ ServiceNow 2016-11-10 15-00-51.png


Thus


-give an interactive filter a name (1). This will show up on the widget;

-define the table (2). And if you want the user to be able to select for which date the filter should work (first screenshot), don't specify a field;

-define a specific field from the table (3) if you don't want the user to be able to select a date.

If you don't want every user to be able to add custom interactive filters to a dashboard, set the roles that should have access (4).

You can add more interactive filter dates to the list. For example:


Custom Interactive Filters _ ServiceNow 2016-11-10 15-26-32.png


resulting in:


ServiceNow 2016-11-10 15-28-07.png

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep