- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:42 AM
Hi folks,
I want to retreive manager sys ID from MRV set,
MRV set is returning list of records as OBJ, when i try ulist.length it's throwing null.
Is there any other way to retreive values from MRV set ?
var gr= new GlideRecord('sc_req_item');
gr.addQuery('sys_id','a21b171297a5021051673e2e6253af8f');
gr.query();
var i;
if(gr.next()){
gs.info('hello');
var val= gr.variables.select_the_group;
var ulist= gr.variables.select_users;//retreiving values from MRV.
gs.info(val);
gs.info(ulist);
gs.info(ulist.length);
}
Output:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:53 AM
Hi @Community Alums,
You can either use a Flow to iterate through the values of an MRVS or use the following script:
var mrvs = current.variables.your_mrvs_name;
var rowCount = mrvs.getRowCount();
//loop through the MRVS contents
for (var i = 0; i < rowCount; i++) {
var row = mrvs.getRow(i);
gs.info(row.variable_name_mrvs);
}
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 02:53 AM
Hi @Community Alums,
You can either use a Flow to iterate through the values of an MRVS or use the following script:
var mrvs = current.variables.your_mrvs_name;
var rowCount = mrvs.getRowCount();
//loop through the MRVS contents
for (var i = 0; i < rowCount; i++) {
var row = mrvs.getRow(i);
gs.info(row.variable_name_mrvs);
}
Cheers