The CreatorCon Call for Content is officially open! Get started here.

Time filters on reports date fields.

maddamsetti
Tera Contributor

Hello Everyone,

 

When I try to create a new report in ServiceNow at the time of applying filter conditions to date fields I am able to see some predefined values like last 2 hours last 30 mins, 15 mins, 45 mins etc.

 

My requirement is to now I want to add the  values under these OOTB value like last 4 hours, 8 hours and 12 hours. I know we can do this through script gs.hoursAgo(-3) but I dont want to perform these validation via script they able to select the configurable values like Last 4 hours, Last 8 hours, Last 12 hours.

 

Could you please confirm is this possible to do it.

 

Please go through attached reference screenshot and have a look on highlighted part where I want to add other time stamps like Last 4 hours, Last 8 hours and Last 12 hours.

 

 

1 REPLY 1

pavani_paluri
Giga Guru
Giga Guru

Hi @maddamsetti ,

 

You want to add more time filter options like: Last 4 hours, Last 8 hours and Last 12 hours

These should appear in the same dropdown where you currently see "Last 15 minutes", "Last 2 hours", etc., when creating reports or filters.
In the left navigation, type and open:
Relative Duration
Click "New" to create a new time option.
Fill the form like this (for Last 4 Hours):
Name: Last 4 hours
Type: Before
Hours: 4
Check "User Display" (so it shows in the dropdown)

Order: 300 (or any number to control position in the list)

Click Save.

Repeat the same steps for Last 8 hours → set Hours = 8 and Last 12 hours → set Hours = 12

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P