Reject Approval if all approvals are Rejected in Workflow

Ankita Gupte
Kilo Sage

Hi Experts,

I am stuck in implementing below condition, appreciate the inputs to achieve below requirement.

The Variable on catalog item is Check Boxes and selection of each checkbox will trigger different approvals to group/users

AnkitaGupte_0-1690373546596.png

At workflow level I have add if check for each opco i.e. if opco is properties then approval will trigger to properties group, if not it will trigger wait for other if checks to complete at "join"

If yes it will go to Approval coordinator  and approval coordinator needs to make decision if further catalog task to trigger or not.

If all approvals are rejected then only request should be rejected, if even the single approval is approved the request should move ahead triggering catalog task.

I have written below script on approval coordinator but its showing error.

if (counts.total ==counts.rejected)
{
answer=rejected;
}
else if(count.total==(parseInt(count.approved) + parseInt(count.rejected)))
{
answer=approved;
}

 

Kindly assist if anyone has better to implement the requirement is also welcome.

 

0 REPLIES 0