- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:19 PM
Hi All,
I have a requirement where I have to get the count of RITM records tagged to the request of a particular RITM as the business rule in running on the RITM table, I tried the below thing but it doesn't seem to work, is there any other way I can get the solution.
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Request Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:28 PM
Try below script:
var grRITM = new GlideRecord("sc_req_item");
grRITM.addQeury("request", current.request);
grRITM.query();
gs.log("Count is: " + grRITM.getRowCount());
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:30 PM
Try changing addQuery to"
gr.addQuery('request', current.request);
Please mark the answer correct/helpful accordingly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:28 PM
Try below script:
var grRITM = new GlideRecord("sc_req_item");
grRITM.addQeury("request", current.request);
grRITM.query();
gs.log("Count is: " + grRITM.getRowCount());
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:30 PM
Try changing addQuery to"
gr.addQuery('request', current.request);
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:47 PM
Hello @Bindhu1,
I tried the below script and it is working fine for me.
var gr = new GlideRecord("sc_req_item");
gr.addQeury("request", current.request);
gr.query();
gs.addInfoMessage("Total RITM Count is: " + gr.getRowCount());
Mark helpful and correct based on the impact
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2022 11:58 PM
Hi
when i try to check the request i think you just need to modify the add query then it will work fine
gr.addQeury("request", current.request);