- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2014 04:11 AM
Where the data were stored for Request Item catalog variables?
I want to fetch all the variables of request item in a single field by comma separated .
Thanks,
Solved! Go to Solution.
- Labels:
-
Service Mapping
- 44,910 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2014 04:31 AM
Hi,
If you want to access all variable related to any request item use following Script.
var item = new GlideRecord("sc_req_item");
item.addQuery("request", requestSys_id);
item.query();
if (item.next()) {
// grab all variable sets from the parent request
var var_own = new GlideRecord('sc_item_option_mtom');
var_own.addQuery('request_item', item.sys_id);
//var_own.addQuery('sc_item_option.item_option_new.u_approval_display', 'global');
var_own.orderBy('sc_item_option.item_option_new.order');
var_own.query();
while (var_own.next()){
gs.print(var_own.sc_item_option.item_option_new.question_text + ": " + eval('item.variable_pool.'+var_own.sc_item_option.item_option_new.name+'.getDisplayValue()') + "\n");
}
}
Thanks,
Sanjeev Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2019 10:31 AM
Hi,
I am trying to copy all variables on RITM to description field on incident table. I am trying the below code but it is copying only one variable though RITM has more than one variable.
Please help me.
var item = new GlideRecord('sc_item_option_mtom');
item.addQuery('request_item',current.sys_id);
item.orderBy('sc_item_option.item_option_new.order');
item.query();
while(item.next()){
inc.description = item.sc_item_option.item_option_new.getDisplayValue() + ":" +eval('current.variable_pool.'+item.sc_item_option.item_option_new.name +' .getDisplayValue()')+ "\n";
}
Thanks,
VC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 01:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2014 05:45 AM
Hi Ashish,
If this solution work for you please mark it as Answerd.
Thanks,
Sanjeev Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2017 04:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2019 03:14 AM
Hi Emy,
You need to copy data from one form to another ?
Or you need to create a reprt on same.
Thanks,
Sanjeev Kumar