- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2017 12:17 PM
Hi Folks,
I have a question regarding Service catalog. I am trying to understand the difference between
sc_req_item & request _item. Can someone explain me the difference between the two.
Thanks,
Ashley
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2017 12:46 PM
Hi Ashley,
The request_item is a column name in sc_item_option_mtom table which takes sys_id of the RITMs. That will help to filter out the GlideRecord of sc_item_option_mtom table to extract the data of a particular related records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2017 07:22 PM
Hi Ashley,
As per my understanding sc_item_option_mtom table is a relation between sc_req_item and sc_item_option tables which allows you to get the list of RITMS being updated for any particular variable with any specific value.
sc_req_item: Contains the record of RITMS
sc_item_option: contains the variables being updated with what values.
Now the below code.
var gr = new GlideRecord('sc_item_option_mtom'); // We are doing the GlideRecord on sc_item_option_mtom which is having a relationship between sc_req_item and sc_item_option tables
gr.addQuery('sc_item_option.item_option_new.name','item_name'); // Here we are providing the name of the variable. sc_item_option is a reference field which holds the the updated variables records, so we are passing the name of the variable which was updated
gr.addQuery('sc_item_option.value','item_value'); // Here we are providing the value of the variable which was updated
gr.query();
while(gr.next())
{ gs.addInfoMessage(gr.request_item.number); } // this will give you name of the RITMS which meets the above Query criteria
I ran the below script in background script and got the result.
var gr = new GlideRecord('sc_item_option_mtom');
gr.addQuery('sc_item_option.item_option_new.name','Client'); //variable name is Client
gr.addQuery('sc_item_option.value','AT&T'); //Variable value is AT&T
gr.query();
while(gr.next())
{ gs.log(gr.request_item.number); }
Result:
List of RITMs in which Client variable was updated with value AT&T
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2017 01:59 PM
Thank you so much XXX

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2017 02:27 PM
Hi Ashley,
If I have answered your questions, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review https://community.servicenow.com/docs/DOC-5601

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2017 12:21 PM
sc_req_item is a table name of "Requested Item.
when ever you submit a request it create "Request" (sc_request) and every request would have multiple Requested Item.
req_item is not a table. from where did you get this name?
Please refer the link below.
Introduction to Service Catalog - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2017 12:33 PM
Thanks Tim, much appreciated. If you see the below comment where harsh has updated req_item, is it the same ?
Thanks harsh vardhan.