- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 04:14 AM
In Approval user activity
how to get all approvals mandatory in a workflow and until all approve or reject, it should wait and in 'Requested' state and once all of them approve then only it should be 'No longer required'. If the first person has approved, still it should be in Requested state
after that 2nd requirement
Example - if 4 owner approvals are in queue ,
if one person approved and 3 persons are rejected .. system should takes as approved in RITM state choice
only all owners rejected , then system should takes as rejected in RITM
How do I achieve this from a workflow ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 08:51 AM
Use the below script:-
So now it will wait till all the response are received
if (counts.total ==counts.rejected)
{
answer=rejected;
}
else if(count.total==(parseInt(count.approved) + parseInt(count.rejected)))
{
answer=approved;
}
Please mark answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 08:43 AM
it should wait all response and then take action like
if one approved , moves to RITM state as approved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 08:51 AM
Use the below script:-
So now it will wait till all the response are received
if (counts.total ==counts.rejected)
{
answer=rejected;
}
else if(count.total==(parseInt(count.approved) + parseInt(count.rejected)))
{
answer=approved;
}
Please mark answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 09:21 AM
EXCELLENT AND WOW , its works
Thanks Saurav , Talented , appreciated
AM not sure , when I will be thinking like you:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 07:44 AM
please use script then
Script already shared by Saurav
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader