Group Approval restrict to 2 members

vinitha3
Tera Guru

When approval is set to a Group, I want only two member to approve.

What happens is, when one member approves then the rest are set to no longer required.

Under group approval script, wait for condition is set to a script.

Any ideas?

Thanks,

Vinitha.K

26 REPLIES 26

vinitha3
Tera Guru

Wait for condition is script only yaar.


Hey Vinitha,

 

the above given script is for the group approval. so it will wait for 2 groups to approve.( but we just need 2 members)

1> Basically In workflow, you need keep "Approval-user" activity instead of "Approval- Group",

2> just add all the members in the approvers field. 

3> add a condition script 

if (counts.approved > 1) {
    
    answer='approved';

}

 this will work.

 

Thanks

Rahul Kathuria
Tera Expert

Try with Approval -user activity once.. I don't think of any other issue..




Thanks  


Rahul Kathuria


Rahul Kathuria
Tera Expert

Don't forget to mark the answer correct if this is helpful:)




Thanks  


Rahul Kathuria


am using this script. But still does not work..



var id;


var group;


for(id in groups)


{


group = groups[id];



}


var cab_approved = group.approved;


var cab_rejected = group.rejected;


var appr_needed = 2;




if (cab_rejected > 0) { answer = 'rejected'; }


if (cab_approved >= appr_needed) { answer = 'approved'; }