Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 04:16 AM
Good afternoon.
Why is my Workflow script not triggering approval to various groups? Approvals are getting skipped. Please check my code below:
// Set the variable 'answer' to a comma-separated list of group ids or an array of group ids to add as approvers.
//
// For example:
// var answer = [];
// answer.push('id1');
// answer.push('id2');
var answer = [];
current.variables.which_im_emea_group == 'IM_EMEA_Food';
workflow.info('Line 11 ' + current.variables.which_im_emea_group);
if(current.variables.which_im_emea_group == 'IM_EMEA_Food'){
workflow.info('Line 14: ' + current.variables.which_im_emea_group)
answer.push('6c1ed1cfc3242610cd77314c05013113');
workflow.info('Line 16 ' + answer.push('6c1ed1cfc3242610cd77314c05013113'));
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Egypt_Energy'){
answer.push('471ed5cfc3242610cd77314c05013127');
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Healthcare'){
answer.push('be1e95cfc3242610cd77314c0501318b');
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Cruise'){
answer.push('5f1ed5cfc3242610cd77314c050131a7');
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Industrial_Maritime'){
answer.push('851ed1cfc3242610cd77314c050131a5');
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Pharma'){
answer.push('7a0edd8fc3242610cd77314c05013192');
}
else if(current.variables.which_im_emea_group == 'IM_EMEA_Türkiye'){
answer.push('d60edd8fc3242610cd77314c05013102');
}
else{
answer.push('a30e51cfc3242610cd77314c05013116');
}
Solved! Go to Solution.