- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:09 AM
I am a little confused on this one. Basically, the Incident Mgmt Process Owner has requested to exclude 5 groups from receiving email notifications when an INC is assigned to them or updated in their group.
I added 5 conditions built around OR statements, but didn't work. It still sent notifications. This is what I built:
However - this worked:
My confusion lies in why the first failed but the second worked. It states that all of these conditions must be met, thus why I built the OR statements for assignment group conditions.
Thanks for any input!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:59 AM
Hi Thomas,
Conditions create what is known as boolean logic. It's a way of comparing a set of data to a collection true/false questions. Let's break down your first set of conditions, and compare it to a hypothetical piece of data.
Assigned To is empty
Assignment group changes
Assignment group is not IT Support Tier 1 Service
or Assignment group is not IT Support Tier 2 PS and Something
or Assignment group is not IT Support Tier 2 NextGeneration
or Assignment group is not IT Support New Hire
Assume that we have a record that was just updated. It is not assigned to anyone specific, but the Assignment Group just changed from "Email Admins" to "IT Support New Hire".
First, we check if the assigned_to field is empty. That passes (true).
Second, we check if the Assignment group is something different *now* than it was before our update. That passes (true).
Then we check that the current assignment is not "IT Support Tier 1 Service". That passes (true) because the the group is currently "IT Support New Hire". Since we've gotten a (true) value from the first check in this group, we don't need to continue evaluating. We met the condition in the first try- Assignment group is not "IT Support Tier 1 Service". In fact, no matter *what* our Assignment Group is, we will always get a (true) from the check!
Why?
Because those ORs are linked to each other. You only go to the *second* OR if the first one returned false. You only go to the third OR if both the first and the second one were false. And so on. Since an Assignment group cannot be both "IT Support Tier 1 Service" and "IT Support Tier 2 PS and Something" at the same time, we will always pass at least one of the first 2 OR statements.
With multiple OR conditions like that, you cannot fail that check.
Your second example worked because you are saying that the record has to meet ALL of the conditions:
Assigned To is empty
Assignment group changes
Assignment group is not IT Support Tier 1 Service
and Assignment group is not IT Support Tier 2 PS and Something
and Assignment group is not IT Support Tier 2 NextGeneration
and Assignment group is not IT Support New Hire
First, we check if the assigned_to field is empty. That passes (true).
Second, we check if the Assignment group is something different *now* than it was before our update. That passes (true).
Then we check that the current assignment group is not "IT Support Tier 1 Service". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "IT Support Tier 2 PS and Something". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "IT Support Tier 2 NextGeneration". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "T Support New Hire". That fails (false) because the the group is currently "IT Support New Hire".
Since you have to meet ALL of the conditions, and we failed the last one, this record fails the condition check.
Put another way. let's say you have a red ball. You can do multiple ORs like this:
Item is ball.
Item is yellow
or Item is blue
or item is green
But you cannot do multiple ORs like this and expect to fail:
Item is ball.
Item is not yellow
or Item is not red
or item is not green
The item is a ball, and it is red. It is therefore not a yellow ball. Your condition passes, because it matches (Item is ball) AND (Item is not yellow).
In code, you'll see these grouped together like so:
var color = "red";
var item = "ball";
var passes = (item == "ball") && (color != "yellow" || color != "red" || color != "green");
The condition check on the multiple-ORs doesn't go past the first comparison [color != "yellow"] because that is true. Red does not equal yellow. No need to keep processing. Linked ORs like this are treated as "only check me if the one I am linked to fails". So we only check that the color does not equal red if the check "color is not yellow" fails.
But if the code changes to this:
var color = "red";
var item = "ball";
var passes = (item == "ball" && color != "yellow" && color != "red" && color != "green");
Then passes is false. We failed one of our must-have conditions (color is not red), so the whole thing fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:18 AM
Hi Thomas,
this is correct and if i had to do the same i will do it in the second way you mentioned
I am finding myself short of words, how to put this in the correct way.
when you are using the Or condition its does return true for one of the cases and hence email goes, whereas when you use and even if one of the condition fails whole thing fails.
Hence in the second case it checkd for all 5 assignment group conditions and if all of them hold true then only it returns true.
in case of first eg
when the first assignment group condition matches, ie its IT support tier 1 service --. this line returns false
but the next one returns true and the overall condition returns true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:24 AM
Yep, my assumption was I could put the groups into OR statements since it would only be assigned to 1 group at a time. The intent was if any of the groups are assigned, it will not notify the members of such group.
I am glad I have what I want, just confused how I got there ☺
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:41 AM
Thomas,
Assuming above are the conditions for your notification. For instance, let us say assignment group was "IT Support New Hire". Ideally you do not want to trigger the notification. Actually what happens is, when it hits the conditions, first condition which says Assignment_group is not IT support Tier ! service is satisfied, so it no longer goes down the line, it triggers notification. Hope it makes sense now
Thanks,
Abhinay
Please mark Helpful, Like, or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2016 09:59 AM
Hi Thomas,
Conditions create what is known as boolean logic. It's a way of comparing a set of data to a collection true/false questions. Let's break down your first set of conditions, and compare it to a hypothetical piece of data.
Assigned To is empty
Assignment group changes
Assignment group is not IT Support Tier 1 Service
or Assignment group is not IT Support Tier 2 PS and Something
or Assignment group is not IT Support Tier 2 NextGeneration
or Assignment group is not IT Support New Hire
Assume that we have a record that was just updated. It is not assigned to anyone specific, but the Assignment Group just changed from "Email Admins" to "IT Support New Hire".
First, we check if the assigned_to field is empty. That passes (true).
Second, we check if the Assignment group is something different *now* than it was before our update. That passes (true).
Then we check that the current assignment is not "IT Support Tier 1 Service". That passes (true) because the the group is currently "IT Support New Hire". Since we've gotten a (true) value from the first check in this group, we don't need to continue evaluating. We met the condition in the first try- Assignment group is not "IT Support Tier 1 Service". In fact, no matter *what* our Assignment Group is, we will always get a (true) from the check!
Why?
Because those ORs are linked to each other. You only go to the *second* OR if the first one returned false. You only go to the third OR if both the first and the second one were false. And so on. Since an Assignment group cannot be both "IT Support Tier 1 Service" and "IT Support Tier 2 PS and Something" at the same time, we will always pass at least one of the first 2 OR statements.
With multiple OR conditions like that, you cannot fail that check.
Your second example worked because you are saying that the record has to meet ALL of the conditions:
Assigned To is empty
Assignment group changes
Assignment group is not IT Support Tier 1 Service
and Assignment group is not IT Support Tier 2 PS and Something
and Assignment group is not IT Support Tier 2 NextGeneration
and Assignment group is not IT Support New Hire
First, we check if the assigned_to field is empty. That passes (true).
Second, we check if the Assignment group is something different *now* than it was before our update. That passes (true).
Then we check that the current assignment group is not "IT Support Tier 1 Service". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "IT Support Tier 2 PS and Something". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "IT Support Tier 2 NextGeneration". That passes (true) because the the group is currently "IT Support New Hire".
Then we check that the current assignment group is not "T Support New Hire". That fails (false) because the the group is currently "IT Support New Hire".
Since you have to meet ALL of the conditions, and we failed the last one, this record fails the condition check.
Put another way. let's say you have a red ball. You can do multiple ORs like this:
Item is ball.
Item is yellow
or Item is blue
or item is green
But you cannot do multiple ORs like this and expect to fail:
Item is ball.
Item is not yellow
or Item is not red
or item is not green
The item is a ball, and it is red. It is therefore not a yellow ball. Your condition passes, because it matches (Item is ball) AND (Item is not yellow).
In code, you'll see these grouped together like so:
var color = "red";
var item = "ball";
var passes = (item == "ball") && (color != "yellow" || color != "red" || color != "green");
The condition check on the multiple-ORs doesn't go past the first comparison [color != "yellow"] because that is true. Red does not equal yellow. No need to keep processing. Linked ORs like this are treated as "only check me if the one I am linked to fails". So we only check that the color does not equal red if the check "color is not yellow" fails.
But if the code changes to this:
var color = "red";
var item = "ball";
var passes = (item == "ball" && color != "yellow" && color != "red" && color != "green");
Then passes is false. We failed one of our must-have conditions (color is not red), so the whole thing fails.