Possible to add date function to condition builder?

Mduperre
Tera Contributor

I have a requirement to add "2 weeks ago" option for date fields on the condition builder. This would function similar to "last week" instead the range would be the beginning of 2 weeks ago + end of that week (customer wants 2 weeks ago data very often and wants to reduce time it takes entering the date range constantly).

 

I've looked at the relative option, 14 days ago + created before last week. But this isn't that great of a workaround considering the days ago would need to change depending on what the current day of the week is when running a report / query. 

 

Dynamic filters are not available for date fields.

 

Is there anyway to customize / add new dropdown options to date fields for the condition builder? If so where would this be located on the platform. We are still using condition builder v1.

 

Any suggestions on this would be very appreciated!

1 REPLY 1

Diogo Ramos
Giga Sage

Hello,

I don't think there is still an oob option available to do this other then using relative values. There is a good article of a similar concept applied at report level : Building Scripted Date/Time Conditions (Last Busin... - ServiceNow Community 

But on the default condition, I'm not aware of an easy way to do it, without having a hardcoded filter on a favorite or using interactive filters on a dashboard [Dashboards] Easily Use Custom Dates in Standard I... - ServiceNow Community 

Good luck