An Easy way to send to another approver

  • 1 August 2017
  • 9 replies
  • 5 views

Badge +9

Hello great community... I'm trying to find a super easy way for the end user to visit a form, select from the approvers list and click send in case that the approver has to be changed even after the workflow had started. It is a one approval stage workflow that it is OK to be stopped and restarted.  

The  users want to be able to send the form to another user for approval in case the approver was incorrectly chosen or the the responsible department is the one to change to whom it should have been routed for approval even after the workflow starts. Delegation by the assigned person is not their best option, they always tend to forget or (don't want to) setup an out of office delegation rule. They don't want to wait or contact the person who was mistakely assigned the task to delegate it to someone else.. The manager needs to be able to choose on the original form whom it should be (or shoudl have been routed to and wants to do that at anytime without having to terminate the workflow and restart the approval. I'm thinking of two ways to do that but not very sure of the details: 

    1. Loop the approval somehow: I tried to create a loop to check if the approver setup on the form is different from the var_approver on the workflows then resend for approval. and also check if the achieved outcome is set to "No". Then reassign... It looks something like this but it is not working. It never re-assigns to another user. 206144_pastedImage_2.png
    2. Create a custom button that the user can hit to stop the current workflow and start a new one (after they choose the new name from a drop down menu). I understand this needs a custom JS and I'm not super familiar with it. 
Any quick (prompt) hints are appreciated..

9 replies

Userlevel 6
Badge +15

Hi Christine - 

When you say this:

The manager needs to be able to choose on the original form whom it should be (or shoudl have been routed to and wants to do that at anytime without having to terminate the workflow and restart 

Do you mean that the manager shouldn't have to do that, or that you don't want to terminate & restart at all?

Because honestly, I think that's how I'd approach it -- if Assign To is modified and isn't the same as previous value, automatically terminate X workflow, and start X workflow after a pause.

Badge +9

So you mean to terminate the current running workflow and start a new one manually.. Just the normal regular way? or how would you "automatically" do that, if the assigned to person was changed?

Userlevel 6
Badge +15

Nope, not manually!

Create a new workflow - in that workflow, set it to only run on modification of Assigned To. Tell it "only run if Previous Value is not equal to Current Value" on Assigned To. 

Use the "Terminate Workflow" action to terminate the current workflow. Add a pause. Then use "Start Workflow" to start that same workflow over again. 

I am not sure if terminating a workflow cancels the tasks within it... if it doesn't, you'd need to grab the task ID (store it somewhere with the first original workflow), and use a web request to kill that as well.

Userlevel 4
Badge +7

Hi ‌ and

Terminating a workflow will cancel the task as well. Like the approach Rhia!

Userlevel 6
Badge +15

Thanks Paul grin.png 

Badge +9

This is awesome. Thanks Rhia! I just tried it and it worked. 

One more thing, I just discovered (Boom) that when I click on the task (even if it is not assigned to me). That I can click on delegate and choose another person and it does save and make this task assigned to that someone else and I get to preserve the original name that was selected on the form. My question is, am I able to do this because I'm a site collection admin? Or can anyone with Full control or contribute delegate a task to someone else even if not assigned to them? I know I could test this, but just thought to ask..  just being lazy here and hopping off to a meeting.. grin.png

Userlevel 6
Badge +15

Don't forget to mark an answer correct, ‌! 

As for this new question.. hmmm... I don't know! Happy to help you test, though, if you want to try and have me delegate something.

Badge +9

Alrighty, so I was able to test with a user who got full control on the site and she was able to delegate the task to someone else. !!.. I never thought before to hit that "delegate" link to send it to someone else while the task is not assigned to me, I always had the impression that if the user is not assigned to the task then they cannot respond to it nor delegate it to anyone on their behalf. But apparently with a full control user, you can. 

So I had both options in, 1) the small workflow that starts upon condition and also 2) the task delegate with the full control user. The nice thing about the delegate is we get to preserve the original name and on the form we are populating also the last respondent so we get to know who actually approved that and on who's behalf. While with the restart workflow the original name is only kept on the old workflow/task that was cancelled. 

So both options worked, the business saw both, like them both and will keep them.. wink.png 

Userlevel 6
Badge +15

The ideal outcome! 

Reply