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

Triggering Different Flows, based on a Value in dropdown in PowerApps

Hello All,

 

I have a scenario like this.....

 

I need to get a document which needs to be Approved by 10 different Approvers for a Normal approval process, there are cases like

 

Case-1: only 3 Approvers need to Approve.

Case-2: only 5 Approvers need to Approve.

Case-3: only 9 Approvers need to Approve.

Case-4: only 7 Approvers need to Approve.

Case-5: 10 Approvers need to Approve.

 

i am planning to provide  a Drop down( Number of Approvers needed:   ) so they can select Approvers.

 

so i am creating 5 different flows for each of them, but i was wondering how i can trigger the respective flow from "Submit button".

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Triggering Different Flows, based on a Value in dropdown in PowerApps

Hi @maruthi216 ,

Could you please share a bit more about your scenario?

Do you want to fire a different flow based on the value you selected within the Dropdown box?

 

Based on the needs that you mentioned, I think If function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Dropdown box to following:

[3,5,9,7,10]

Set the OnSelect property of the "Submit" button to following:

If(
    Dropdown1.Selected.Value = 3,
   'FlowName1'.Run(...),         /* <-- Fire a flow only 3 Approvers need to Approve*/   
    Dropdown1.Selected.Value = 5,
    'FlowName2'.Run(...),         /* <-- Fire a flow only 5 Approvers need to Approve*/ 
    Dropdown1.Selected.Value = 9,
    'FlowName3'.Run(...),           /* <-- Fire a flow only 9 Approvers need to Approve*/ 
     Dropdown1.Selected.Value = 7,
    'FlowName4'.Run(...),             /* <-- Fire a flow only 7 Approvers need to Approve*/ 
     Dropdown1.Selected.Value = 10,
    'FlowName5'.Run(...),            /* <-- Fire a flow which needs 10 Approvers to Approve*/ 
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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.

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Triggering Different Flows, based on a Value in dropdown in PowerApps

Hi @maruthi216 ,

 

use swicth case

Switch(dropdown.selected.Value, 3, call flow with 3 approvers, 5, call flow with 5 approvers .....)

 

However, better option would be to call just 1 Flow and pass the approver list

then in Flow accordingly set the approvers for the task

 

If 10 people are going to approve serially, be careful since the flow run has to complete before 30 days (flow run duration is 30 days)

 

you can also look at patterns to avoid the 30 day limitation

https://sergeluca.wordpress.com/2018/11/26/new-flow-state-machine-pattern-with-unlimited-running-tim...

 

Regards,

Reza Dorrani

 

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

maruthi216
Level: Powered On

Re: Triggering Different Flows, based on a Value in dropdown in PowerApps

Hello RezaDorrani,

 

Attached is the image, is that what ur suggesting to trigger different Flows based on Number of Approvers..?

 

Thanks.

 


@RezaDorrani wrote:

Hi @maruthi216 ,

 

use swicth case

Switch(dropdown.selected.Value, 3, call flow with 3 approvers, 5, call flow with 5 approvers .....)

 

However, better option would be to call just 1 Flow and pass the approver list

then in Flow accordingly set the approvers for the task

 

If 10 people are going to approve serially, be careful since the flow run has to complete before 30 days (flow run duration is 30 days)

 

you can also look at patterns to avoid the 30 day limitation

https://sergeluca.wordpress.com/2018/11/26/new-flow-state-machine-pattern-with-unlimited-running-tim...

 

Regards,

Reza Dorrani

 

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


 

 

Community Support Team
Community Support Team

Re: Triggering Different Flows, based on a Value in dropdown in PowerApps

Hi @maruthi216 ,

Could you please share a bit more about your scenario?

Do you want to fire a different flow based on the value you selected within the Dropdown box?

 

Based on the needs that you mentioned, I think If function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Dropdown box to following:

[3,5,9,7,10]

Set the OnSelect property of the "Submit" button to following:

If(
    Dropdown1.Selected.Value = 3,
   'FlowName1'.Run(...),         /* <-- Fire a flow only 3 Approvers need to Approve*/   
    Dropdown1.Selected.Value = 5,
    'FlowName2'.Run(...),         /* <-- Fire a flow only 5 Approvers need to Approve*/ 
    Dropdown1.Selected.Value = 9,
    'FlowName3'.Run(...),           /* <-- Fire a flow only 9 Approvers need to Approve*/ 
     Dropdown1.Selected.Value = 7,
    'FlowName4'.Run(...),             /* <-- Fire a flow only 7 Approvers need to Approve*/ 
     Dropdown1.Selected.Value = 10,
    'FlowName5'.Run(...),            /* <-- Fire a flow which needs 10 Approvers to Approve*/ 
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,088)