- 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 07:00 AM
Hi Saurav yes
if any one rejected , its moves to rejected state --
Its should be moves to rejected state ,when all approvers rejects
if any one approved , it should move to approved state
any idea
through condition script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 07:21 AM
Hello Sukan,
Then use the below condition based script saying if the total number ofd approvals is equal to the total number of rejection only then it will be rejected else it will be approved
Script:-
if (counts.total ==counts.rejected)
{
answer=rejected;
}
else
{
answer=approved;
}
Screenshot:-
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:21 AM
I tried , but its not waiting for other approver response ,
Its takes as approved immedietaly and other approvers moved to no longer required state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 08:29 AM
Why should it wait for other approvers response, you mentioned that
if any one approved , it should move to approved state that is why as soon as anyone approves it goes for approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 08:36 AM
Requirement is , each owner approved , it will trigger a task and assigning to concern team
Task creation works asexpected
so its mandatory for each owner individual approval , and we consider if anyone move approved , then RITM is in approved state
any other suggestion ?