- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 10:29 PM
Dear Team,
Hope, you all are doing well.
I’m looking for some help in workflow where in Group Approval Activity at least 6 approvals are required to approve a change. But, not sure how we can achieve this from scripting.
If anyone can help with samples like how does script looks like, then it’s really help me.
Appreciate your help and support.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 11:01 PM - edited 02-13-2025 11:29 PM
Hello @_Samay
Can you try the below code.
answer = '';
for(var id in groups){
var group = groups[id];
if(group.rejected >= 1){
answer = "rejected";
}
else{
var numberOfApprovals = 6;
var approvedArray = group.approvalIDs["approved"]; // sysId of the users who approved
gs.log("Approved array: " + approvedArray);
if(approvedArray.length >= numberOfApprovals){
answer = "appproved";
}
}
}
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 06:01 AM
Dear @Najmuddin Mohd . Above script looks fine for me, but more help. Any further configuration needs to be done into above script. like where to configure Group Details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 10:05 AM - edited 02-17-2025 10:06 AM
Hello @_Samay
In the Approval - Group Activity,
You need to add the Approval group in the Groups list collector,
And click Advanced checkbox and add the script.
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.