Custom RITM approval notification dependent on specific variable on catalog item

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:38 AM
Hello, we use a single approval notification for all Requested Item approvals in our instance.
What I want to do is have a second approval notification that ONLY gets used when 1 of our 40+ catalog items gets submitted and a specific variable on that catalog item has a specific value.
When looking at the notification "When to send" section, I can't think of a way to identify a condition where catalog item has to = "xyz" and variable x has to = "123":
Is there a way to add an "AND" condition under the "Approval for.Task type is Requested Item" for the other conditions I need?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2019 03:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2019 07:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2019 04:25 PM
You can also achieve it by using Advanced condition. So you can write something like this:
answer = (current.sysapproval.ref_sc_req_item.cat_item.name == 'ITEMNAME');
Let me know if it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2019 08:10 AM
Are you able to drill further down into a specific variable name/value as well?
So example: answer = (current.sysapproval.ref_sc_req_item.cat_item.name == 'ITEMNAME' && current.variables.override_yesno == 'true');
What would be the correct way to do something like that? The condition I need is where catalog item = "xyz" while checkbox variable on catalog item xyz = "true"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2019 02:00 PM
Yes you can check the variable value by using the following:
answer = (current.sysapproval.ref_sc_req_item.cat_item.name == 'ITEMNAME' && current.sysapproval.ref_sc_req_item.variables.override_yesno == 'true');
Let me know if it helps.