cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexandruChiser
Frequent Visitor

Sequential Approval with reminders issue

Hello,

I have a SharePoint List, and each item has three columns: Manager Approval / Admin Approval / Request

 

What I want to do is to create a flow which sends an Approval Request to the Manager (if he does not accept it, remind him every x days), then, if the Manager accepts it update the Manager Approval column and send another Approval Request to the Admin (if he does not accept it, remind him every x days), then, if the Admin accepts it update the Admin Approval column, and in the end update Request column.

Until now, I have the following workflow:

 

WorkFlow.png

 

1) When an item is created

2) Get User's Manager

3 and 4) Initialize two variables ApprovalManager and ApprovalAdmin

5) Create an Approval For Manager

5a) Wait for approval from Manager                                                5b) Do until ApprovalManager is equal to True

6a) Set variable ApprovalManager to True                                       6b) Delay 3 minutes

7a) Condition Outcome is equal to Approve                                    7b) Condition ApprovalManager is equal to false

8a) Update item column Manager Approval                                    8b) Send reminder with link for approval

9a) Create an Approval for Admin

10aa) Wait for approval from Admin                                                10ab) Do until ApprovalAdmin is equal to True

11aa) Set variable ApprovalAdmin to True                                       11ab) Delay 3 minutes

12aa) Condition Outcome is equal to Approve                                12ab) Condition ApprovalAdmin is equal to false

13aa) Update item column Admin Approval                                    13ab) Send reminder with link for approval

 

This workflow works fine, but not till the end. If I don't approve the request, I get an email remainder every 3 minutes. I click the link from the reminder, it opens the sharepoint request on the right side of the window and I can select "Approve", then the Admin gets the new request... if the Admin does not approve it in that timeframe, an email reminder is sent to him... And here's the problem:

If the Admin accesses the link from the reminder, it opens the request on sharepoint in a tab on the right side of the window and he gets a pop-up "The request is no longer active"... If he clicks the X button, he can see the request in his list and accept it from there. Then, his column is updated in the Sharepoint list, together with the

 

MicrosoftTeams-image (2).png

MicrosoftTeams-image (3).png
How is this happening? The initial Approver can flawlessly approve it from the window tab, but the 2nd one encounters that error, but still can approve it after closing the error? How can I fix this? 

Thanks in advance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@AlexandruChiser 

What link are you including in your reminder email?  Can you post a screen shot?

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

8 REPLIES 8
AlexandruChiser
Frequent Visitor

I found one way to fix this: split the workflow into 2 separate ones:

1st - when item is created > send approval request to manager > if he accepts it, his column is marked as YES (otherwise, after 3 minutes a reminder is send)

2nd - when an item is created or modified > check the value for the previous column > if YES send approval request to admin > if he accepts it, his column is marked as YES (otherwise, after 3 minutes a reminder is send) and the Request column is set to ACCEPTED.

This way, having two workflows that do the same thing as the single one, ensures that I am not getting the "The request is no longer active" error. Now I can see the option to approve/reject it directly from the window tab. 

It's really weird. Although I wanted to have only 1 workflow for these steps... I can live with the idea of having 2 separate ones. 

PS: the 2nd workflow will run every time a column of an item is changed , and that's something I wanted to avoid: depending on other columns.

@AlexandruChiser 

To prevent issues when the second workflow runs every time a change is made, insert a SharePoint "Get changes for an item or file" action immediately after the trigger.  Check the "has changed" in Dynamic properties for the column where the approver marks "yes".  If the column has not changed, then exit the Flow possibly by using a control terminate action (with success).

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
AlexandruChiser
Frequent Visitor

WorkFlow_admin.png

 

This is the workflow I'm using:

1) When an item is created or modified

2) Get Changes for an item or a file (properties only)

3) Initialize variable

4) If HasColumnChanged of my column equals true

5) If that value of that column equals to YES

6) Do the whole approval request magic

I've tested this workflow, and it works, but as said before, every time something changes, it gets triggered. But it lasts for 25ms or so and it ends, because the HasColumnChanged of my column equals false.

@AlexandruChiser 

I believe that this is the best that you can do.  The only way to stop a Flow from running is with a trigger condition and you can't create a trigger condition based on whether a column has changed.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
AlexandruChiser
Frequent Visitor

This might be the best solution... and for now, I will stick to it.

Do you have any idea about the issue regarding "The request is no longer active"?

@AlexandruChiser 

What link are you including in your reminder email?  Can you post a screen shot?

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
AlexandruChiser
Frequent Visitor

For the first Approver (User's Manager), the reminder email has the following link: RESPOND LINK (for manager)

 

And for the 2nd Approver (Admin), the reminder email has the...

It seems that I messed it up... the admin had the same RESPOND LINK (for manager). I might have selected the wrong one. I fixed it now, let me check if it works and I will come back with an answer.

BTW: This mistake was done in the first workflow I posted, the big one.

AlexandruChiser
Frequent Visitor

Based on what we discussed (msg no 7 and 8)... I fixed it and now... IT WORKS.

 

Can't believe I couldn't find the issue... As the saying goes: "couldn't see the forest for the trees".

Thank you once again @ScottShearer, you saved me!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,265)