
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 10:51 AM
Hello,
I have a catalog item where I have created a reference variable called "Requested by". If this field is the same user that the approval is going to I want the approval skipped.
How do I accomplish this?
Thank you in advance!
Joe
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 10:33 PM
You can use If activity with script just before your actual approval and return yes or no
if activity script
answer = ifScript();
function ifScript(){
// your logic to determine the approver here
var approver = 'your value';
if(current.request.requested_for == approver)
return 'no'; // output of this goes to next activity by skipping approval
else
return 'yes'; // output of this goes to approval activity
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 04:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 10:19 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 12:54 PM
Do you know who is approving? Is it the Requested for.Manager, or someone else?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 04:23 PM
Sometimes it will be Requested for.Manager. We also have a field where we add customer approvers that is used for some items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 10:33 PM
You can use If activity with script just before your actual approval and return yes or no
if activity script
answer = ifScript();
function ifScript(){
// your logic to determine the approver here
var approver = 'your value';
if(current.request.requested_for == approver)
return 'no'; // output of this goes to next activity by skipping approval
else
return 'yes'; // output of this goes to approval activity
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader