WF Group Approval Activity results

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 03:01 PM
Hi Community,
Is there a way to set the result of a group approval in the workflow based on the amount of results by individuals?
For example: If an approval is assigned to a group that contains 5 people, and all of them must take an action (approve or reject). Let's say that 3 users approve and 2 user reject, then the result should be 'approved'. Meaning that whatever action taken combined is greater, that should be the result of the activity but all users must be taken into consideration.
I've looked at the Percentage based approval solution (https://www.servicenowguru.com/graphical-workflow/approval-percentage/ )that Mark Stanger has but I don't think that would achieve what I'm trying to do. I would like all users to take an action and then set the activity result based on what was greater, either approve or reject.
Is this possible? And if so, can you provide some guidance on how to get it done?
Any suggestion is truly appreciated!
Thank you,
Yeny
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 02:13 PM
Try using the following as well, I hope it helps.
if(counts.requested == 0){
if((counts.approved / counts.total)* 100 > (counts.rejected / counts.total)* 100){
answer = 'approved';
}
else
answer = 'rejected';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 02:48 PM
Aaaaaaaah!!! I just realized what my mistake is!! I am using an Approval - Group activity when I should be using Approval - User activity. After looking at your screenshot carefully I realized that you're using the approval -user activity. I changed it on my workflow and it worked! I can't believe it took me this long to see it lol
Thank you so much for your help and time! I really appreciate it!
Yeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 03:38 PM
Happy to Help.