cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tricky778
Level: Powered On

Using the Approval Flow to send to an alternate approver

Hi guys, 

I have a powerapps form which basically functions as follows:

 

  1. Form submitted via PowerApps >
  2. SharePoint list updates >
  3. Another user then checks the form details within PowerApps and selects submit (to kick start an approval process)
  4. Flow kicks in and sends an approval to the 'Manager Email' (picked up from the Office 365 Users connector). 

I have a requirement to set an alternate approver. And as such I have another text field called 'Alternative 1st Approver'. 

My thought train is that at stage 3 above, the person checking the form could enter the email address of an alternative user. 

 

What I'm looking for, is for Flow (specifically the approval element) to have the ability to carry out a check as follows:

 

  • If SharePoint list item 'Alternative 1st Approver' contains an email address send the approval to it
  • If it is blank, send the approval to the 'Manager Email' (picked up from the Office 365 Users connector)

 

Flow.JPG

 

Does anyone know if this is possible or a means to achieve this?

 

Thanks,

Tricky

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Using the Approval Flow to send to an alternate approver

@Tricky778 

I agree with @Pstork1 but would like to suggest that this could also be done with a coalesce expression and no condition.  The coalesce expression will return the first non-null value

In my example, I have a column called Alternate Approver.  My coalesce expression looks like this:

coalesce(triggerBody()?['Alternate_x0020_Approver']?['Email'],body('Get_manager_(V2)')?['mail'])

 

 

Coalesce1.jpg
 
 
 
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

4 REPLIES 4
Dual Super User
Dual Super User

Re: Using the Approval Flow to send to an alternate approver

Yes, Its very possible.  I would do it this way.

 

  1. Create a string variable to hold the approver's email.
  2. Get the manager's email and add that to the variable.
  3. Use a condition to check whether the alternative approver field is empty or not.  If not, set the approver variable to that email address.
  4. Send your approval normally, but use the variable for the assigned to field.


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

Re: Using the Approval Flow to send to an alternate approver

@Tricky778 

I agree with @Pstork1 but would like to suggest that this could also be done with a coalesce expression and no condition.  The coalesce expression will return the first non-null value

In my example, I have a column called Alternate Approver.  My coalesce expression looks like this:

coalesce(triggerBody()?['Alternate_x0020_Approver']?['Email'],body('Get_manager_(V2)')?['mail'])

 

 

Coalesce1.jpg
 
 
 
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

Dual Super User
Dual Super User

Re: Using the Approval Flow to send to an alternate approver

I hadn't thought of that approach.  Its a good solution.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Tricky778
Level: Powered On

Re: Using the Approval Flow to send to an alternate approver

Thanks for the suggestions @Pstork1  @ScottShearer , coalesce expression proved to do the job 👍

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,796)