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.

Filter condition

Rosy14
Kilo Sage

How to get list of records where end date is not more than 14 days from current date?

9 REPLIES 9

Aman Kumar S
Kilo Patron

Hi @Rosy14 

You can use below filter condition:

You can ignore the state is new condition, I have applied filters for Planned start date.

Screenshot 2024-02-27 194027.png

Best Regards
Aman Kumar

Naga Ravindra R
Kilo Sage

Hi @Rosy14 

following will help:

 

NagaRavindraR_0-1709043314579.png

 

encoded query is : 

end_dateRELATIVELT@dayofweek@ahead@14
 
Let me know if you need more help on any script

Why it is not coming for me?

Rosy14_0-1709043387969.png

 

Rosy14_1-1709043409452.png

 

Resoled

AndersBGS
Tera Patron
Tera Patron

Hi @Rosy14 ,

 

Just utilize the relative operator as shown below:

AndersBGS_0-1709106687790.png

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/