n service catalog based on variable value approval needs to be triggred for different groups

Community Alums
Not applicable

In service catalog based on variable value approval needs to be triggred for different groups.There are 8 choices in the variable for each value Approval goes to a specific group in workflow

7 REPLIES 7

In the sys_user_group table, are you using the 'type' column to contain 'accounts', 'payment', etc, or what is the connection here?

 

Community Alums
Not applicable

there is no connection 

Then I have to go back to the question, when someone selects 'accounts' how is the system to know which group to use?  If the answer exists only in a manual mapping then the Approval - Group script would be something like:

var myValue = current.variables.variable_name;
if (myValue == 'accounts') {
    answer.push('965c9e5347c12200e0ef563dbb9a7156'); //account team group sys_id
} else if (myValue == 'payments') {
   answer.push('1111111111'); //payment group sys_id
}

for each choice - using your variable name, values, and group sys_ids - or use a switch/case statement instead.