value is showing as undefined

sanjana5
Tera Contributor

Variable Value is not populating in RITM while trying to fetch from another variable (i.e, variable set)

if (req_type == 'remove_access'){

var req = current.variables.ldap_id_of_user_to_remove;

current.variables.ldap_id_s = req;

}

field is showing as undefiend instead of getting the userID.

Any suggestions? Thanks In Advance

@BharathChintala

1 ACCEPTED SOLUTION

BharathChintala
Mega Sage

@sanjana5 

to get multirow variable set value. Try below code
var list = [];
var mvrs = current.variables.users_access; // getting variable set name
mvrsCount = mvrs.getRowCount(); //row count of variable set
for(var i = 0; i< mvrsCount; i++){
var row = mvrs.getRow(i);
var ID = row.ldap_id;
list.push(ID);
}
current.variables.id = list.toString();

 

Check backend names properly.

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

View solution in original post

1 REPLY 1

BharathChintala
Mega Sage

@sanjana5 

to get multirow variable set value. Try below code
var list = [];
var mvrs = current.variables.users_access; // getting variable set name
mvrsCount = mvrs.getRowCount(); //row count of variable set
for(var i = 0; i< mvrsCount; i++){
var row = mvrs.getRow(i);
var ID = row.ldap_id;
list.push(ID);
}
current.variables.id = list.toString();

 

Check backend names properly.

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala