Why is a notification still being triggered when conditions are not met?

Mark OToole1980
Tera Contributor

We have built a notification to send when a Change is rejected.  The requirement was for this to differ from other approval notifications.  We have this notification sending, but the generic is still firing even though we have updated the conditions and they are not met.  Any advice on why 2 notifications sending.  Thanks

2 ACCEPTED SOLUTIONS

NotNowBoss
Tera Guru

Hello,

Change it from an OR to AND.  

You're using OR between two conditions, like this:

if condition1 OR condition2

This means the code will proceed if either condition is true, even if the other is false.


Why you need AND

You want both conditions to be true at the same time for the logic to proceed. So, the correct logic is:

if condition1 AND condition2

This ensures the block only runs when both conditions are met.



(On the phone so i'll give this picture) 
image.png


View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark OToole1980 

the reason it's triggering is because you have used OR condition.

You should use AND

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

NotNowBoss
Tera Guru

Hello,

Change it from an OR to AND.  

You're using OR between two conditions, like this:

if condition1 OR condition2

This means the code will proceed if either condition is true, even if the other is false.


Why you need AND

You want both conditions to be true at the same time for the logic to proceed. So, the correct logic is:

if condition1 AND condition2

This ensures the block only runs when both conditions are met.



(On the phone so i'll give this picture) 
image.png


Bhimashankar H
Mega Sage

Hi @Mark OToole1980 ,

 

As it is event fire notification, may be event is firing at both the times you need to check where it is getting fired by gs.eventQueue. 

May be flow designer, business rule...

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

Bhuvan
Kilo Patron

@Mark OToole1980 

 

Can you share generic notification filter conditions ?

 

Check sys_email_log to check what is triggering the dual notification as I believe you have not set filter conditions correctly.

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark OToole1980 

the reason it's triggering is because you have used OR condition.

You should use AND

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader