- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 06:21 AM
Hello,
To verify whether we have a defect on our implementation of ServiceNow, I am trying to produce a list of Catalog Tasks (SCTASKs) or Request Items (RITMs) or Requests (REQs) where:
- State of the SCTASK/RITM/REQ is [Pending] or [Work in Progress]
- State of the parent Case is [Closed]
I have tried 'dot walking' in the filter builder but I am unable to find the appropriate Related Field to use in order to filter a list of these ticket types by the State of their parent Cases. Is this possible?
Any help figuring out this filter would be much appreciated!
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 05:31 AM
Hi Peter, this is absolutely possible.
All you need to do is go to list view, open condition builder and first identify which field is having parent case. Suppose it is Parent field then you just have to type parent in the filter and select parent=> Task fields. This will show you the fields of parent table.
Then again click on the parent fields and you will be able to see the fields of parent record and select 'state' field there and then apply your condition. This will give you the list of records as per your condition.
Above example I took for RITMs. Hope that answers your question.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 06:31 AM
Hi Peter,
How is the parent case defined here? Is it present in the 'parent' field or there is a separate field for 'case'. So we need to figure out that first and once we have that info, we can just write scripts to get the result. Script can be something like this.
var ritm = new GlideRecord('sc_req_item');
ritm.addEncodedQuery('stateIN-5,2^parent.state=3'); // considering the 'parent' field is used for parent cases.
ritm.query();
while(ritm.next())
{
gs.info('RITM number '+ritm.number);
gs.info('Parent '+ritm.parent.getDisplayValue());
}
Similarly you can write the script for sc task and requests also.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 06:44 AM
Hi Mohit,
Thank you very much for your suggestion - unfortunately I'm afraid I am a ServiceNow ITSM user rather than an admin or developer so I do not have access to writing scripts.
I was hoping there might be a way to do this in the Tasks, Requests or Requests Items list views, if this is possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 05:31 AM
Hi Peter, this is absolutely possible.
All you need to do is go to list view, open condition builder and first identify which field is having parent case. Suppose it is Parent field then you just have to type parent in the filter and select parent=> Task fields. This will show you the fields of parent table.
Then again click on the parent fields and you will be able to see the fields of parent record and select 'state' field there and then apply your condition. This will give you the list of records as per your condition.
Above example I took for RITMs. Hope that answers your question.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 05:39 AM
Hi Mohit,
Many apologies for the late response - thanks very much, that's exactly the filter I needed. Thank you so much for your help.