Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Adding new option to date

Community Alums
Not applicable

Hi,

I want to add new option(Two years ago) to the filter,

I've added "answer.add('180_Two years ago@javascript:gs.monthsAgo(24)@javascript:gs.endOfThisMonth()', gs.getMessage('Two years ago'));" this in OOB BR-- Get Date Filter Options for Date Filters. but it isn't showing up.

 

KhasimPathan_0-1709188056168.png

 

Is there any other way to achieve this ?

1 ACCEPTED SOLUTION

Hi @Community Alums 

 

No, it's not possible to add. Please refer below post where ServiceNow support confirmed on the same:

https://www.servicenow.com/community/developer-forum/how-to-add-new-selections-to-the-filter-options-list/td-p/2386077

 

You can create a relative filter and save it with visibility to everyone so that it could be reused.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

10 REPLIES 10

Hi @Community Alums ,

 

Fo that you can give the filter condition as below,

swathisarang98_0-1709296424914.png

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

 

@Community Alums Did you get a chance to look at the above solution ?

 

thanks

swathi

Thank you so much!  This worked for me. 

Amit Verma
Kilo Patron
Kilo Patron

Hi @Community Alums 

 

Filter for 2 Years ago is offered OOB. Can you please give that a try instead of creating a custom one.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Community Alums
Not applicable

@Amit Verma ,

Isn't that possible to create a filter option ?