How to get same output of the script by using OOTB filter conditions of incident Records for cross checking purpose..??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 12:37 AM
var inc = new GlideRecord('incident');
inc.addActiveQuery();
inc.orderBy('number');
inc.chooseWindow(2,10);
inc.query();
while(inc.next()){
gs.print(inc.number);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2022 06:24 PM
Hi Satish Samrat,
Please be aware that setLimit internally calls chooseWindow, However to apply the same in the filter you may need to use some advanced conditions in the URL parameters
I have some references for you to start exploring
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0868974
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0994141
Note: setLimit internally calls chooseWindow.
Please Mark ✅ Correct/helpful, if applicable,
Thank you,
Govind Das
