cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OzHamid
New Member

Looking to have Approval Flow start after rejection

Hello,

 

I am trying to figure out a way to have an Approval restart after it has been rejected. For example, an item is submitted to sharepoint for approval and is reviewed by the approver. The approver may reject it and note to the submitter that they just need to change something minor (or what have you) for it to be approved. Now, I don't want the flow to end, I want it to wait for a specific period of time and check to see if the item was modified by the submitter (meaning, they went back and changed what they needed to). Once it sees that change, it should resend the approval to the approver for review. Does anyone have any experience with this/know how to do this?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

You could use one Flow, but it may get complicated.  If you want to keep it simple, you may want to spilt into two Flows.

 

Scott

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

27 REPLIES 27
vecerpa
Memorable Member
Memorable Member

I'm also interested in this. Is there some solution?
P.
v-xida-msft
Community Support
Community Support

Hi @OzHamid,

 

How do you want to do if the second approval email (after changing what they need to) is also rejected by the approver?

 

I have created a SharePoint list on my side and the data structure of it as below:6.JPG

Note: The TaskName column and Executor column are both Single line of text type column, Due Date column is a Date type column, ApprovalStatus column is a Choice type column (available value: "Approved" or "Rjected") and the default value of it is null. The Last Modified Time column is a Date type column, which is used to store the last modification time of the item.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a "Start an approval" action, specify Assigned to field.
  • Add a "Condition", left input box set to Response dynmaic content of "Start an approval" action, right input box set to Approve, within middle drop down, choose is equal to.
  • Within "If/yes" branch of Condition, add a "Update item" action, ApprovalStatus Value field set to Approved, Last Modified Time field set to Modified dynamic content of the trigger.
  • Within "If/no" branch of Condition, add a "Send an email" action to notify the submitter that they just need to change something for it to be approved. Then add a "Update item 2" action, ApprovalStatus Value field set to Rejected, Last Modified Time field set to Modified dynamic content of the trigger.

         Add a "Do Until" action, within condition box, click "Edit in advanced mode", type the following formula:

@equals(body('Get_item_2')?['ApprovalStatus']?['Value'], 'Approved')

       Within "Do Until" action, add a "Delay" action, Count set to 1 and Unit set to Minute. Add a "Get item" action, Id field set to ID dynamic content of the trigger. Then add a "Condition 2", left input box set to Modified dynamic content of the "Get item" action, right input box set to Last Modified Time dynamic content of "Get item" action. Within "If/yes" branch of "Condition 2", add a "Start an approval 2" action, then add a Condition 3, left input box set to Response dynmaic content of "Start an approval 2" action, right input box set to Approve, within middle drop down, choose is equal to. Within "If/yes" of Condition 3, add a "Update item 3" action, ApprovalStatus Value field set to Approved, Last Modified Time field set to Modified dynamic content of the "Get item" action. Within "If/no" branch of Condition 3, add a "Send an email 2" action to notify the submitter that they just need to change something for it to be approved. Then add a "Update item 4" action, ApprovalStatus Value field set to Rejected, Last Modified Time field set to Modified dynamic content of the "Get item" action. Under "Condition 3" (still within "If/yes" branch of Condition 2), add a "Get item 2" action, Id field set to ID dynamic content of the trigger.

 

Image reference:7.JPG

 

8.JPG

 

The "Do Until" action:9.JPG

The "Condition 2" action:10.JPG

The Condition 3 action:11.JPG

 

The flow works successfully as below:12.JPG

 

13.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xida-msft,

 

This is quite complex workaround. I was thinking about something like this, I need to use it in multilevel approval, so I need to figure out how to do it :).

But thank you for showing me the path.

P.

Anonymous
Not applicable

Hi @vecerpa, Did you ever come up with a solution? I want to create an approval flow, and just like you, I want a way to resubmit an approval request at the stage it was rejected and needs modification. 

 

-Sam

jcollins
Advocate II
Advocate II

I have come up with a way to do this but it can get very cumbersome and confusting to follow. But here goes: 

Mine is also multi approvers... so this is added to every NO condition after the Approval stage: 

 

photo of flow here

 

if Rejected, the flow will send an email to the creator and then update the status of the item. Then it will wait until the item has been modified by the original creator before it creates a new item with all the same data after the saved correction. It then terminates.  The creation of the new item then kicks off the Flow on that new item. 

 

The trick is to ensure your Get Item is getting the right version of the item and that you are creating the new item with the corrected data. 

 

The problem here then becomes: What happens if the new item is rejected... Since the Author of the newly created item no longer belongs to the person who originally submitted it, that user won't be able to edit it. The new item gets created by the person who creates the flow and with my permissions set to only allow users to see & edit  their own items, they won't see the 2nd item that was created by me if it gets rejected again. 

 

I haven't done this yet but my idea to solve that matter is to create (or copy) that new item in a different location that is open to everyone for editing. Once they make their edits, it copies that item back to the original place and deletes it off the everyone location.   I need more ideas though... this might be too complicated..  Thanks!

Hi @Anonymous,

 

I was not able to test it yet, by Serge Luca have nice blog post on his site about state machine in Flow.

https://sergeluca.wordpress.com/2018/01/21/pattern-for-implementing-state-machines-with-microsoft-flow/.

 

The only problem is that it requires some people logic when working with approvals to be able to work when rejected.

P.

ScottShearer
Super User
Super User

I'd like to suggest that it might be a better approach to have the user manually re-submit the item for approval once it has been rejected.  My reasoning is that the user might make multiple edits to an item before it is ready to be resubmitted. How can you determine that the user is through making edits unless it is manually resubmitted?

 

Also, the Approval process does not provide you with a way to determine exactly what needs to be changed so there is no way to know if the requested changes have been made. 

 

Have you considered using a "For a selected item" action to allow the user to re-submit?

 

If you want to remind the user that they need to resubmit and you are updaring the item with the result of the approval (rejected), you might run a Flow once a day (or less frequently...) that looks for items in your list that have been rejected and sends a reminder email saying that the item needs to be revised and resubmitted.

 

One final thought - you might include a boolean column in the list titled something like "ready to Resubmit for approval".  Have a flow run when the item has changed and start the approval process again if the user has checked that box.  I would also clear the check box when the Flow runs so that it doesn't run again the next time there is a change.

 

 

 

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

Scott

@ScottShearer - How would recommend handling Reject and Reject for Re-Submit?  In the first scenario the individual is NOT allowed to make changes, and in the second that are allowed.

Thanks @ScottShearer! I like your final suggestion on having them check a box to indicate they are finished and want to re-submit.  This seems feasible because you are right, if they just wanted to save and not submit, that would create an issue. 

 

 I already do the reminder flow which works nicely, thanks!

 

 And no, i have not looked at the "For a selected item" action yet, what does it do?  I haven't found any info on it yet. 

 

 

@robertcaretta :

 

In a scenario where an individual is not allowed to make changes, it is implied that permissions are changed on the item such that they cannot edit the item.  Flow does not natively support this concept yet.  However, Serge Luca has written a blog on how to accomplish this via SharePoint web service calls.  In addition Plumsail has a connector that allows you to set permissiuons as well (not free).

 

Another option is to copy items that shopuld not be editied to another list where the individual has only read permissions and delete the originasl entry.  If these items will never change, then way not move them to another list?

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

Scott

The "For a Selected Item" trigger allows for a user to select a specific SharePoint item and manually start a Flow.  This is very similar to running a manual SharePoint Designer workflow.

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

Scott

@ScottShearer  Yes, this is exactly what I originally wrote about... but I didn't want to pay for plumsail so my new solution is to keep the list permissions set to Contribute for everyone and re-create a new item when the rejected one gets modified, then delete the rejected one. The newly created one will start the workflow again.  

 

To prevent users from seeing other items they are not supposed to see, i have created only one public view and Filtered it based on the a hidden column called "Original Creator" which stores the name of the user who submitted the original request. The user cannot edit the view or create another view so they won't see any other items that they didn't create.   My HR staff get Design perms so they can go ahead and create a Private view showing all the items as needed.

Your solution of "hiding" rows of data by controlling what views they see works well enough if you don't need true security.  It is easy enough to view SharePoint data outside of SharePoint by using a variety of other tools (such as MS Access, scripting, etc.) and bypass SharePoint views all together.

 

Also, unless you are using a custom permission level (which it sounds like you might be) users can create their own views and see any data in the list to which they have at least read permissions.

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

Scott

It is not "true" security but with "Contribute" perms, my users do not see the option to create another view. They only see the filtered view i created as the default view. They can add/delete columns they see in that view and save as a private view but can't access the filtered options.  Thank goodness none of my users are savvy enough to write any script.  So for now this is a very viable solution.

@ScottShearer - I plan on working out the row level permissions after I have the skeleton of the logic worked out. But yes,  I strip permissions off after a user submits the item and return permissions at the appropriate time. You can also start with just ADD permissions on a list as a users default rights.

 

Sorry if I wasn't clear. What I was getting at was providing the Approver the ability to take one additional action in additiona to Reject. In many of my existing use cases I give the approver 3 options:  Approve, Reject, Return. This works great with our on-premise system with Nintex. However with Flow and using the built in approval system, you only get Approve and Reject. Just trying to understand if perhaps you or anyone else has a strategy around this. Seems like there is no customization at all with the approval system, and I don't see a way of collecting more information from the approver. Would be nice if I could ask the Approver a simple question with a drop-down menu of additional custom options. 

 

I love the fact that Microsoft provides mobile apps for Flow and the pre-exisitng functionality, but I feel slightly constrained with just Approve or Reject. 

For the sake of sharing, I also found and reported a bug with the action "Update Approval Status" as it relates to the list item create and modify trigger. Doesn't work as you would expect it. This has been confirmed by the Product Team.

 

https://powerusers.microsoft.com/t5/I-Found-A-Bug/SharePoint-List-Created-Modified-Trigger-Conflicts...

@ScottShearer - Thank you for sharing the example by Serge. I may end up implementing that.  Here is how you go about pulling the details for all your site collection permission rolls.

 

Get-PnPRoleDefinition;
$role = Get-PnPRoleDefinition -Identity Read;
$role | Format-List;

Hey, @robertcaretta!

 

Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" so that this thread will be marked for other users to easily identify!

 

Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



I am logged in and the option to "Accept as Solution" is not available to me.  @OzHamid is the owner.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,624)