- 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,916 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
03-04-2019 07:45 AM
from what I see (and experienced) sc_item_option.value has a limit of 4000.