Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//GlideRecord to the RITM table to access the name and corresponding value of MRVS
var getVariables = new GlideRecord('sc_req_item');

//Pass the sysId of RITM record
if (getVariables.get("<pass_ritm_sys_id_here>")) {

//<mobile_devices_set> is the internal name of MRVS
var mrvsInternalName = getVariables.variables.mobile_devices_set;
var rowsCount = mrvsInternalName.getRowCount();

if (rowsCount > 0) {
for (var i = 0; i < rowsCount; i++) {
var getRowVal = mrvsInternalName.getRow(i);
var getCellVal = getRowVal.getCells();

for (var j = 0, len = getCellVal.length; j < len; j++) {
var mrvsFieldName = getCellVal[j].getName();
var mrvsFieldValue = getCellVal[j].getCellDisplayValue();
gs.info(mrvsFieldName + ' : ' + mrvsFieldValue);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
This code comes handy to retrieve the name and value of Multi Row Variable Sets(MRVS).

Sample:
RITM is raised with below MRVS details:

<img width="1819" height="290" alt="image" src="https://github.com/user-attachments/assets/b03063c1-a8a5-4128-b19f-d451e80b7388" />


Background Script:

<img width="886" height="515" alt="image" src="https://github.com/user-attachments/assets/2d368b99-88d9-4e2f-9fc9-985b1d68efad" />

Output:

<img width="536" height="194" alt="image" src="https://github.com/user-attachments/assets/43aa8ac8-0799-43cc-a7d6-a80dc28d36a3" />



Loading