Additional Condition on Approval User Activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2020 11:13 PM
Hi Team,
My requirement is to add another condition like 'Approved' and 'Rejected', called 'More Information Required' in the Approval Group Activity,
so I have created the condition 'More Information Required' in the workflow activity
and added the same in Choices of State field on Approval(sys_approval_approver) table.
And in the condition field added : activity.result =='more_info_required'
Now, when I select approve or reject the workflow goes to the next activity but not when I select More Information Required in the
approval table record, it gets stuck in the same activity and doesn't proceed.
I am sure I am missing something, I don't know how does the activity.result gets set to the state(like in case of approve and reject)
Can someone please help me on this.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2020 03:25 AM
Hi Sai,
I guess you need to add state choice value: more_info_required for table Group approval (sysapproval_group) & not Approvals (sysapproval_approver) as you are using Group approval activity & not Approver- User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2020 01:07 AM
Did you create a custom choice on sysapproval_approver state field i.e. "More Information Required"
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
09-06-2020 01:34 AM
Hi
I do not think, it will be sufficient to add the choices.
If I look into the Workflow definition of the "Approvoal - Group" Workflow Activity under
> Workflow > Administration > Activity Definition
There is a function at line 424, which determines the result of the "Approval Group" Activity.
I think (not sure), that you need t add your option here to work properly. This would mean to change the OOB Script in the Activity Definition.
In this case, I STRONGLY recommend to make a COPE of the "Approval Group" WF Activity and name it e.g. "My Custom Group Approvals" to distinguish!
Then you can experiment with it.
Let me know about your advance in this topic.
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2020 06:11 AM
Thank you all for all your suggestions. The below code had worked for me.
I figured it out by myself.
var answer = '';
//one approval to approve the activity
for (var id in groups) {
var group = groups[id];
if (group.more_info_required == 1){
gs.log("answer is :"+answer);
answer = 'more_info_required';
gs.log("answer is set :"+answer);
}
else if (group.approved == 1){
gs.log("answer is :"+answer);
answer = 'approved';
gs.log("answer is set :"+answer);
}
else if (group.rejected == 1){
gs.log("answer is :"+answer);
answer = 'rejected';
gs.log("answer is set :"+answer);
}
else{
answer='';
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2020 12:12 PM
Hi
Thanks for your feedback. Can you please let me know, how you set the "Approval - Group" to "more_info_required"?
Do you have some extra BR implemented?
You cannot manually set this "State" to the Group Approval record.
I would like to see the details that brings the "group.more_info_required" value to "1".
Thanks for letting me know, please.
BR
Dirk