Checking number of users who approved on a group on workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 01:17 AM
I used the following code on the forum (Solved: Custom condition is not working on group Approvals - ServiceNow Community) and that seems to work, however I would still feel more comfortable if the sys_id narrowed down the group. Still hoping someone can help.
for (var id in groups) {
var group = groups[id];
/*if(groups[id].approvalIDs['conditionally_approved'])
{
answer ='conditionally_approved';
}
else */
if(group.approved >= 5) {
answer ='approved';
}
else if(group.rejected > 0) {
answer ='rejected';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 01:52 AM - edited 03-14-2024 01:52 AM
I have tried it this way and it fails. So, I am confused that is the group sys_id why is it not recognizing it as the group.