Workflow approvals - 2nd level

M_iA
Kilo Sage

Hello,

We have the following process in one of our catalog item workflows:

Line manager approval

Check variable record to retrieve 2nd approval. This approval retrieves 2 or 3 approvers from the variable and sends. Any one of the approvers can approve the item for it to progress.

 

Ive now had a requirement to change this slightly and not sure how to achieve. Could someone help?

 

If the line manager has approved in the 1st approval but is then also one of the 2nd level approvers, we either neither to omit them from the approval or have another of the remaining approvals if the line manager approves the 2nd level approval.

1 ACCEPTED SOLUTION

Thanks for replying @Shao 

Ive actually just this second figured it out.

 

This is an old workflow using workflow editor!

In the approval activity, I updated the script with the following query:

getTSL.addQuery('u_user' != current.variables.requested_for.manager); // user is not requested for's manager

 

This then omits the prvious approver from the 2nd round of approvals

View solution in original post

2 REPLIES 2

Shao
ServiceNow Employee
ServiceNow Employee

Not very sure I completely got your question. But from what I gathered, if the first level approver is also one of the second level approvers, then he/she will not be part of that list of second level approvers because he/she has already approved at the first level.

 

Assuming you're in flow designer, I would probably use an if condition here, where we will validate if the line manager is one of the users in the second approval group. If he/she is, then I will include logic to omit that user from the second approval group.

Thanks for replying @Shao 

Ive actually just this second figured it out.

 

This is an old workflow using workflow editor!

In the approval activity, I updated the script with the following query:

getTSL.addQuery('u_user' != current.variables.requested_for.manager); // user is not requested for's manager

 

This then omits the prvious approver from the 2nd round of approvals