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

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
Highlighted
Community Support
Community Support

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
Highlighted
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

Highlighted
Helper III
Helper III

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


 

 

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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