In change request filter condition

PRADEEPREDDY GU
Tera Expert

Hiii,

Can anyone help me on this...

 

var cr = new GlideRecord('change_request');
cr.addEncodedQuery('active=true^start_dateRELATIVELE@dayofweek@ahead@7^start_dateRELATIVEGE@minute@ahead@1');

 

for above encoded query in change request how we can select, i didnt understand,.after Active true, what?

PRADEEPREDDYGU_0-1731520004589.png

 

1 ACCEPTED SOLUTION

Zach Koch
Giga Sage

Here is what your string query translates to

ZachKoch_0-1731520256073.png

start_date in the query string is actually Planned Start Date (which is the label) in the filter

 

View solution in original post

4 REPLIES 4

Zach Koch
Giga Sage

Here is what your string query translates to

ZachKoch_0-1731520256073.png

start_date in the query string is actually Planned Start Date (which is the label) in the filter

 

PRADEEPREDDYGU_0-1731520761928.png

for myself relative is not there, how we can select

It should be there, as shown in screenshot 

ZachKoch_0-1731520973960.png

However your Planned Start Date field might be customized, as Starts With as shown in your picture, followed by an empty field, is normally associated with a string field data type, not date. Do you have more than one Planned Start Date field when selecting fields?

 

Abishek1998
Tera Expert

Hi,

 

Relative on or before: This condition filters records where a date field's value falls on or before a relative date (e.g., today, last week, next month). This is useful for finding records up to a certain point in time relative to today or another date.

 

Relative on or after: This condition filters records where a date field's value falls on or after a relative date. It is used to find records starting from a certain point in time and extending into the future.

 

For example:

 

To find incidents created within the last 7 days, you could use Created Date → Relative on or after → Today - 7 days.

 

To find all tasks due by the end of the month, you might use Due Date → Relative on or before → End of this month.

These relative conditions are flexible and can adjust based on the current date, making them ideal for reports and scheduled jobs that need consistent, date-relative results.