Need a filter to get all the incidents where resolved after 2,4,7 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 09:04 PM
Hi Experts,
I want to use "Lookup records" Action in Flow Designer to get all the records of Incident which are in resolved state for 2 days (using resolved date and time field), so that I can send reminder and similarly reminder for 4 days.
Can someone please help in providing the filter screenshot in incident list.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 09:31 PM
- Create a filter to get all the incidents resolved after 2,4,7 days in ServiceNow
- Use the 'Resolved' field in the 'sys_updated_on' condition
- Select the 'greater than' operator and enter the required days
- Save the filter and run it to get the desired results
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2023 12:33 AM - edited 05-26-2023 01:13 AM
Hi @Sam ServiceNow ,
You can use below code to get incidents which have been resolved for 2 days
var incGr = new GlideRecord("incident");
incGr.addEncodedQuery('resolved_atRELATIVEGT@dayofweek@ago@2^resolved_atRELATIVELT@dayofweek@ago@1');
incGr.query();
while (incGr.next()) {
gs.print(incGr.number);
}
Similarly just modify filter in line 2 to get incidents which have been resolved for 4 days
incGr.addEncodedQuery('resolved_atRELATIVEGT@dayofweek@ago@4^resolved_atRELATIVELT@dayofweek@ago@3');