Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

Anurag Tripathi
Mega Patron

Here is a sample script for change request, you can change the table/field names as needed.

var records = new GlideRecord('change_request');
records.addEncodedQuery('end_dateRELATIVELT@dayofweek@ahead@14^end_date>=javascript:gs.beginningOfToday()');
records.query();
while (records.next()) {
	//records.getValue('number'));
//do whatever
}
-Anurag

Hi,

Can you show me the condition in filter of the list.

Something like this, 

AnuragTripathi_0-1709043238321.png

 

 

You can always modify the filter to get the result you need.

-Anurag

is this thread answered @Rosy14 

-Anurag