How to get all approvals mandatory in a workflow and until of them approve, it should be 'Requested' and once approve / reject then only it should be 'No longer required'.

sukran
Mega Sage

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 ?

1 ACCEPTED SOLUTION

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.

View solution in original post

13 REPLIES 13

Saurav11
Kilo Patron
Kilo Patron

Hello,

If you are using the Approval user/group activity for controlling the approval there thet have a condition for approval option in that activity

find_real_file.png

 

So here you  can control when you want the workflow to move forward there are different options. If you want the approval approved when even one user approves, select the below option

find_real_file.png 

Please mark answer as correct/helpful based on impact.

 

@Saurav

 

@Saurav  if one rejected , its moves to rejected state --

 

We want only moves to rejected state , if all rejected 

any idea 

 

through condition script ?

 

 

sukran
Mega Sage

@Ankur Bawiskar any help that appreciated 

Hello Sukran,

Did you get a chance to see my answer