- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 09:45 AM
I am trying to exclude a notification. I set up a secondary approval notification for a specific item, but I can't seem to exclude items from the normal approval notification. I added the following:
// Seems I should be able to put this logic in the condition builder (Approval for.Request Item.Item is Not 'Contractor Monthly Review') but not working
answer = true;
// 'Contractor Monthly Review' request item sys_id = 16172199db199410e4221fdc139619f2
if (current.sysapproval.cat_item == '16172199db199410e4221fdc139619f2' || current.sysapproval.cat_item == '760d2315db491450e4221fdc13961986' || current.sysapproval.cat_item == '7cc3b519893e08690fb70bacc5cba104d') {
answer = false;
}
And yet I'm still firing 2 approval notifications. Any specific thing you're seeing that I might have missed?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 10:26 AM - edited 08-07-2024 10:33 AM
I see the problem, sysapproval is a reference to the task table which does not have cat_item on it. So we need to do a lookup with GlideRecord.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.sysapproval);
gr.query();
if (gr.next()) {//check to verify this isa catalog item
if (gr.cat_item == '16172199db199410e4221fdc139619f2' || gr.cat_item == '760d2315db491450e4221fdc13961986' ||
gr.cat_item == '7cc3b519893e08690fb70bacc5cba104d') {//do not sent notification
answer = false;
} else { //send notification when not one of the above catalog items
answer = true;
}
}
else { //send notification when not a catlog item
answer = true;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 11:02 AM
Yes the same thing should work for approval group. You just may need to check the column name are the same on approval group as they are on approval table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 10:31 AM
Hi @Venjamin,
Have you tried setting this on the Approval Notification record conditions? You should be able to select the Catalog Item(s) you'd like to exclude and those you'd like to include from the 'When to Send' Conditions.
Hope this helps,
Josh Pirozzi