cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Super User III
Super User III

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
Highlighted
Dual Super User III
Dual Super User III

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.
Highlighted
Super User III
Super User III

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

Highlighted
Dual Super User III
Dual Super User III

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.
Highlighted
Helper I
Helper I

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,838)