Line manager

nameisnani
Mega Sage

Hi Team ,

 

Can anyone please me in Workflow , 

 

nameisnani_0-1709620199159.png

 

 

For every - option we have to give line manager approval , and for each option 2nd level approval is different , 

 

I have stuck here , If I give line manager , and workflow will be big . . . . . workflow maintenance is very tough , 

 

how should we proceed with approvals . 

 

nameisnani_1-1709620198844.png

 

 

Can anyone please help ...... me help me here with steps . 

 

Can anyone please help how can we reduce adding line manager for every option .

 

Thanks in advance 

6 REPLIES 6

Sohithanjan G
Kilo Sage
Kilo Sage

Hi @nameisnani 

 

Is your line manager is same for all items ? If not same, is it from any logic like requested_for.manager ? If the line manager is different for all items & the Approver 2 is also different for items. You can do mapping, while creating an array in the script part of approval. 

Storing the Key value pair in an array like below & utilize them in mapping. Use the same approach in approval2 as well. 

 

var appr = [
  { FS Support : "Line Manager" },
  { FS Corporate Action: "Line Manager" }
];

  

🙂

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @nameisnani 

 

I hope it is Request For > LineManger (i.e request_for.manager)...

 

For Approval 1 :

You can create 1 activity of approval in place of many which trows approval to request to requested_for.manager and you can map the same activity every time you need to send approval for requested_for.manager.

 

For Approval 2:

You can maintain the group approval activity in the workflow. If you again dont want to have many activities in chart you can create 1 script activity which will trigger a flow to a given group based on sys_propery value. You need to create 1 sys_properities in json value pair with all groups.

 

I hope this helps...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Hi @Sohail Khilji , @Sohithanjan G 

 

Thanks for Quick response 

 

could you please provide me the screenshot of WF activity for more better understanding .

@nameisnani 

 

You can use the Approval - User activity with the below script.

 

 

If requested for is reference field

answer=[];

answer.push(current.variables.requested_for.manager);

 

🙂

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)