- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:06 AM
I want to add an approver to my current workflow only if a request is submitted by a user of a specific company and the approver will be the same for all requests submitted by a user of a specific company.
Below is the screenshot for your reference:
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 05:41 AM
So take if activity and use the logic which I given in script section and code the yes node to new approval activity.
Let me know if any queries.
Happy to help:)
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:16 AM
Hi
You can utilize if condition activity based on the requested for company you can add the node to the new approval activity.
Sample logic:
// This script needs to set answer to 'yes' or 'no' to indicate the state of the activity.
//
// For example,
//
answer = ifScript();
function ifScript() {
if (current.request.requested_for.company.name == "GIVE COMPANY NAME HERE") {
return 'yes'; //trigger for approval
}
return 'no'; //ignore
}
Hope it helps..
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 12:21 AM
Sorry Murthy but Can you guide me on where do I need to add this script?
answer = ifScript();
function ifScript() {
if (current.request.requested_for.company.name == "GIVE COMPANY NAME HERE") {
return 'yes'; //trigger for approval
}
return 'no'; //ignore
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 03:12 AM
As per the screenshot you attached I can see two approval activities so where exactly you want to add this condition?
After the 1st level of approval or 2nd level of approval?
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 05:31 AM
Regards,
Burhan Shah