The CreatorCon Call for Content is officially open! Get started here.

Multirow variable set If condition in workflow

Sneha39
Mega Guru

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';
}

 

3 REPLIES 3

Harish KM
Kilo Patron
Kilo Patron

//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
}
}

Regards
Harish

Community Alums
Not applicable

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

Nic Omaha
Tera Guru

Did you happen to get a solution for this? Im needing to do the same thing.