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

How to allow user to choose who to send Approval to

I am building a flow that needs to accomplish the following: 

 

  1. Triggered when a file is uploaded in sharepoint
  2. File Uploader needs to identify who they want to be the first approval of this file
  3. First approver is sent the Approval request to Approve/Reject

Currently, I am using Approvals to allow the File Uploader to type in the email of the First Approver (works, but susceptible to typos, requires the inputter to remember the email or have to look it up, and can go outside the organization). What I'd like to do is to allow the File Uploader to choose the First Approver through a people picker field.

 
 
 

Is this possible? Are there any other user-friendly alternatives? 

 

I've also tried using custom approvals to have multiple choices for a first approver (person1, person2, person3 instead of Accept, Reject, Reject with Edits) but this is not scalable as you add approvers. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to allow user to choose who to send Approval to

 

Hi @chenjonathanc ,

 

You can first determine if the email contained in the Person field is empty, and if so, send an email to remind the File uploader to select a user. The name of my Person field here is Approver.

 

It is recommended that you create a new field named ApprovalStatus to record whether the approval is completed because the trigger is When a file is created or modified (properties only).

In order to avoid repeatedly creating approval requests, you need to determine whether the previous approval request has been completed.

 

If the value of the ApprovalStatus field is not equal to Completed, then an approved action is performed. After executing the approval action, you need to update the ApprovalStatus value to Completed.

 

Image reference:

85.PNG

 

Best Regards,

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

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User
Dual Super User

Re: How to allow user to choose who to send Approval to

The easiest way to do this is add a People/Groups column to the document metadata and make it a required field.  If you want multiple approvers you can allow multiple selections. Then have the flow get the email addresses from that field after the flow kicks off.



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

Re: How to allow user to choose who to send Approval to

@Pstork1 Would the user then have to fill in the required Person field in Sharepoint when uploading then? As opposed to kicking off an input request through flow? 

 

Also, my understanding of the Trigger is that it kicks off when the file is created. What's the best way to delay kick off until the required field is populated? 

Highlighted
Dual Super User
Dual Super User

Re: How to allow user to choose who to send Approval to

Yes, they would need to fill in the required field when uploading the file to SharePoint. The only way to prompt the user directly to input a user would be to use the For a Selected File trigger. But I think that would just be a text box with no validation as I remember.

 

In terms of when it kicks off.  If the person field is required then no one will see the file until that field is checked in since new files missing required fields are left in a checked out state. Only the original author can see them.  I would assume that would keep the approval from kicking off also, but I haven't tested that.



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

Re: How to allow user to choose who to send Approval to

Ran a test and the flow does kick off regardless of whether required fields are filled in or not.

 

I would have to include a "Wait for required fields to be filled in" before moving on to the next step. Not sure if this is possible or not. 

Highlighted
Community Support
Community Support

Re: How to allow user to choose who to send Approval to

 

Hi @chenjonathanc ,

 

You can first determine if the email contained in the Person field is empty, and if so, send an email to remind the File uploader to select a user. The name of my Person field here is Approver.

 

It is recommended that you create a new field named ApprovalStatus to record whether the approval is completed because the trigger is When a file is created or modified (properties only).

In order to avoid repeatedly creating approval requests, you need to determine whether the previous approval request has been completed.

 

If the value of the ApprovalStatus field is not equal to Completed, then an approved action is performed. After executing the approval action, you need to update the ApprovalStatus value to Completed.

 

Image reference:

85.PNG

 

Best Regards,

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

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,816)