Add option to date filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 02:42 AM
Hi Community,
I am attempting to add an extra value to the date filter:
From reading other posts I think the key lies in modifying the "Get Date Filter Options for Date Filters" business rule but I have added the line that I want and it does not appear to work.
To clarify, I am trying to add an option for "Last 2 months" and added the below line to the business rule:
answer.add('041_Last 2 months@javascript:gs.monthsAgoStart(2)@javascript:gs.endOfThisMonth()', gs.getMessage('Last 2 months'));
Do i need to change anything else to get this to work?
Thanks!
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 03:06 AM
Hi,
Modify your piece of code in this way:
answer.add('041_Last 2 months@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoStart(-60)', 'Last 2 months');
***Mark helpful/correct if it works for you
Regards,
Munender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 03:20 AM
Hi Munender,
Thanks for your suggestion. Unfortunately this didn't work.
I'm not totally convinced that this business rule is responsible for the available filter options.
I commented out a couple of the options but this didn't have any effect on the filter.
Do you know if these filter options could be added/controlled from somewhere else?
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 04:07 AM
Checkout this resource - https://docs.servicenow.com/bundle/london-performance-analytics-and-reporting/page/use/dashboards/ta...
this might help in resolving the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 02:48 AM
I've added the choice in the BR but still not able to see that choice on table filter.
Please let me know if you have found a solution.