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

How do you create a dynamic approal in which the approvers is selected based on your form answer?

Hello everybody, I wished you a good day

 

I want to ask question about the microsoft flow approval feature. I want to make a form, in which the approvers is selected based on the question answered by the form respondent.

For example, if the respondent answered their department to "Dept001", then the form is forwarded for the approval of superior in Dept 001 (via email). If the respondent answered their department to "Dept002", then the form is forwarded and waiting to the approval of superior in Dept 002.

 

Can you please help me on this?

Is there any build in flow for my problem?

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Level 10

Re: How do you create a dynamic approal in which the approvers is selected based on your form answer?

Hi @ihutamap ,

As you said, if the Dept002 had no approvers, so the 'Email' column should be empty.

I suggest add a condition before the approval to check if the 'superior' column is empty(on your side is 'Email' column).

The expression in Condition 2 is:

empty(body('Get_items')?['superior']) is not equal true.

Capture14.PNG

Best Regards,

Community Support Team _ Zhongys

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

3 REPLIES 3
v-zhos-msft
Level 10

Re: How do you create a dynamic approal in which the approvers is selected based on your form answer?

Hi @ihutamap ,

First, I think you need an interrelated data source here to related the department and the superior.

I made a SharePoint list on my side to related the department and the superior.

Capture.PNG

I have made a flow for your scenario, please check it for a reference.

Capture1.PNGCapture3.PNG

 

Best Regards,

Community Support Team _ Zhongys

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

ihutamap
Level: Powered On

Re: How do you create a dynamic approal in which the approvers is selected based on your form answer?

Hi @v-zhos-msft , good day

 

Thanks for your reply Smiley Very Happy . I followed your guide and it's working absolutely well!. Thanks for your help.

There's one problem though, for my testing, I used dept001 and dept002 (it's called 'station' in the picture below). Dept001 needs A approval, and Dept002 needs B approval.

 

Based on the below picture, when I put Dept002 on the form, the "yes" and "no" scenario is working simultaneously. When I entered Dept002 on the form, it emailed to B, for his approval, but then it emailed to me aslo, to notify that Dept002 had no approvers (the "if no" condition is by sending an email to me, notifying that Dept002 had no approvers)

 

Can you help me on this?

 

Approval.png

v-zhos-msft
Level 10

Re: How do you create a dynamic approal in which the approvers is selected based on your form answer?

Hi @ihutamap ,

As you said, if the Dept002 had no approvers, so the 'Email' column should be empty.

I suggest add a condition before the approval to check if the 'superior' column is empty(on your side is 'Email' column).

The expression in Condition 2 is:

empty(body('Get_items')?['superior']) is not equal true.

Capture14.PNG

Best Regards,

Community Support Team _ Zhongys

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

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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 Kudoed Authors (Last 30 Days)
Users online (5,659)