My Request Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a question about filtering specific catalog items from appearing in My Requests. I created a filter under the My Requests Filter module, but I cannot dot walk from Request to RITM to Item. When I tried it, the filter removed every request instead of only the intended ones. I also created a filter directly on the sc_req_item table, but it had no effect. I even deactivated the existing Request filter for testing, and the RITMs with those items still weren’t excluded, leaving no records showing at all.
The customer does not want these items duplicated, since they will be displayed in another widget. Because of that, I need to hide any requests that include RITMs for those specific items, but I’m not sure what the correct approach should be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @RicardoSanchez,
Since request is the parent you cannot dot walk to the child. They way it was explained to me is that the child knows everything about the parent but the parent knows nothing about the child. You would most likely need to run a scrip to hide requests with these certain catalog items. The problem then becomes if user are allowed to request multiple item and 1 is something you want to hide but the other is not then what do you do? Do you hade that request from the user and then they cannot see there item that they should because the request is hidden.
I'm not sure this is good configuration so I would ask why do they want to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @RicardoSanchez ,
Directly you can't dot walk to parent to child that means sc_request to sc_req_item, instead I'm adding some below background script you can take reference
var reqSysId = '0bb649a99355f2549305f520ed03d676';
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', reqSysId);
ritm.query();
while (ritm.next()) {
gs.print('RITM: ' + ritm.number + ' & Item: ' + ritm.cat_item.getDisplayValue());
}
This is will you RITM number and catalog item, you can use this script.
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak