Report Ranges for the Future

aaron_damyen
Kilo Expert

Can anyone outline the basics of creating a set of Report Ranges for use with a DateTime field representing a future date, or point me to a good description?   The wiki documentation doesn't make any hint as to whether the functionality works with future dates.

The Report Ranges feature is great for grouping dates and times together relative to now(), it only seems to work correctly when the values in the DateTime field are in the past.   An example is a simple report to show the number of Certificates coming up for expiration.   Simple groups would be:

> 1 year

6mo - 1yr

3mo - 6mo

4wk - 12wk

now() - 4wk

< now()

I think the calculation can handle the simple math involving possible negative days, but I cannot get the combination of range min/max and order to work out properly.   I seem to either get records all in one group or in all groups but one.   I'm really looking to identify the pattern so I can reapply this for some of the reports used in Project Management.

Thanks in advance,

1 REPLY 1

gyedwab
Mega Guru

There's two codeless ways of doing this.



If this is table-specific, you can define a field to hold the grouping, and use Condition Check Definitions ( Condition Check Definitions - ServiceNow Wiki ) -- that's how upcoming contract expirations are managed in Software Asset Management.



If you want this to be a reporting capability globally without requiring code, you can leverage a reporting tool like Explore Analytics to get this as a live reporting capability, defined by any user on a report-by-report basis (not requiring an admin intervention or javascript) using the binning feature.