Multirow variable set If condition in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 02:24 PM
Trying to access MRVS variable in if condition of workflow but not working :
answer = ifScript();
function ifScript() {
var rowInt = current.variables.mrvsset //mrvsset : internal name of mrvs
if (rowInt.variableOne == 'test') {
return 'yes';
}
return 'no';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 05:52 PM
//try this
var mrvs;
mrvs = current.variables.mrvsset;
var rowCount = mrvs.getRowCount();
for (var i = 0; i < rowCount; i++) {
var row = mrvs.getRow(i);
gs.info("ROW"+row); // print this to seeyour variable name
var app = row.variablename; //Your variable bame
gs.print(app + ' '); // print here to check the value
}
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2022 07:39 PM
Hi Sneha,
Please refer to below threads:
https://community.servicenow.com/community?id=community_question&sys_id=a40441a6db840110770be6be13961963
https://community.servicenow.com/community?id=community_question&sys_id=acd8c277db6e7b00414eeeb5ca96197c
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 07:20 AM
Did you happen to get a solution for this? Im needing to do the same thing.