- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 07:06 AM
Hello,
I got an issue with some RITMs which remain in state open/in progress even when all sctasks were already completed long time ago. I need to get the list of such RITMs.
I found a great solution in postSolved: Report on all Open RITMS but all the related sctas... - ServiceNow Community , thank you @Ankur Bawiskar. However after migration to Xanadu, my report is empty.
I have created identiacal script include as client callable.
Condition of Report
sys_id [IS ONE OF] javascript: new RRRRRRR().getRITM();
When I checked client callable, i was asked for role, so i used itil role.
@Ankur Bawiskar do you have any idea what could be changed in Xanadu or what i did wrong? Before migration it worked perfectly.
Thank you so much in advance,
Best regards,
Fotina
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:36 PM
Conditions on related records are sometimes a little harder to express.
Also, you need to express how many you expect. You're saying "GREATER THAN OR EQUAL TO 1" before your conditions.
The conditions you SHOULD Have are more like "NONE", where sc_task.active = true.
AKA: "Count all the active tasks, and if that count is 0, then I've passed the conditions, therefore show me the RITM".
WARNING!! This will be true for any RITM that is *also* waiting for approval before sc_tasks generate, so you may want to add a condition to your main RITM conditions like "stage != Approval"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 08:16 AM
Why do you even need scripting? I've done this multiple times with conventional Report Conditions.
You start with a List report and make sure you leverage the Related Record conditions.
Here's a video I did on that concept.
https://youtu.be/gkzKzSXbwk0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 11:25 AM - edited 12-30-2024 11:30 AM
Hello @Uncle Rob ,
Hello @Ankur Bawiskar
Thank you, in case of table sc_req_item, what should i choose in Related List conditions? Cause i dont see catalog task>task, I need to see RITMs where tasks are closed complete, but now it still shows me RITMs moxed with completed tasks and in progress tasks. But i dont need in ritms where tasks are in progress.
Thank you for your support!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 11:33 AM
sc_task's label is "Catalog Task". Makes it easier to find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 11:37 AM
Hi @Uncle Rob Thank youso much for quick reply, yes I found it quickly,however it just still shows me Ritms with both tasks closed and in progress, even though I put Active is false. I thought maybe there is something else what I am missing. BTW great youtube channel, thank you for sharing!