How to setup Conditions on the sysapproval_approver email notification for certain Request Items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 10:43 AM
Hello everyone,
i need some advise.
i have created a few catalog items using the sc_req_items that has approvals added to them.
I was able to make a email script to read the request items variables and have them displayed on the approval email
what can i do to have this to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 10:53 AM
Hello @Peter Williams ,
You can try advanced condition. You can refer to this documentation:- LINK.
Please Mark my answers Helpful & Accepted if I have answered your questions.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 11:00 AM
yes i was thinking of this but not sure how to configure it for a sc_req_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 11:26 AM
Hello @Peter Williams ,
You can use below script in the advanced condition and change the catalog item query and answer value as per your requirement.
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('source_table', 'sc_req_item');
gr.query();
if (gr.next()) {
var req = new GlideRecord('sc_req_item');
req.addQuery('sysapproval', current.sysapproval);
req.addquery('cat_item.name', 'name of the catalog item');
req.query();
if (req.next()) {
answer = true;
} else {
answer = false;
}
}
Please Mark my answers Helpful & Accepted if I have answered your questions.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 11:43 AM
i am sorry to say but it didnt work