Notifications being triggered at the same time

Joshua Comeau
Kilo Sage

I have a workflow that has sys approver step and a sys approval group step both triggering at the same time wondering how to condition it so that if the group is unique only send one notification

Notification 1 condition:

JoshuaComeau_0-1705417393861.png

 

Notification 2 condition:

JoshuaComeau_1-1705417402000.png

 

2 REPLIES 2

Sandeep Rajput
Tera Patron

@Joshua Comeau Are your advanced condition actually working? In your script, you are comparing the display value of the assignment_group with the group sys_id which is bound to fail.

 

Let's understand this using an example.

Assignment Group: Service Desk

Sys_id: d7dd7f454777b51092c98021336d430f

Name (display field): Service Desk

 

Your code would be interpreted as follows at the run time

var assigmentGroup = approvalRecord.assignment_group.getDisplayValue(); //Service Desk

if('Service Desk'=='d7dd7f454777b51092c98021336d430f'){

}

 

The above condition is destined to fail. Instead update your code as follows.

var assigmentGroup = approvalRecord.assignment_group+'';

if(assigmentGroup=='d7dd7f454777b51092c98021336d430f'){ //replace sys_id with your group sys_id
answer =false;
}

Hope this helps.

 

its still sending duplicate emails