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

Flow multiple conditions

Hello everyone,

I hope it wont be considered as spam, but i saw that the thread where i first wrote this is marked as Solved, so i guess noone looks at it anymore.

Be so kind and help me, I cant figure out how to adapt your example to my situation.

I attached an example of what i should do. A simple excel file with a simple set of rules but isnt so simple when i try to insert them into a flow.

For example, if my client debt is between 75000 and 150000 and the overdue is, lets say, 83 days, approval should go to the 6th option.

Also if i need to unblock a client for 2 months, flow condition should go to case 5 or 6, depending on the debt value and overdue. For unblocking for more than 3 months, the approval should choose case 8 or 9.

Any idea? Thats even possible?

 

And if flow cant do that, maybe if i keep just the debt and overdue conditions, it is possible to create a flow that can send approvals?

Thanks !

 

Approvals.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Mike2500
Level 8

Re: Flow multiple conditions

So, you have a whole bunch of conditions to return the proper case number. Flow can do nested conditions, but it's a pain to work with a single nested condition, let alone the amount you have. Another strategy is to use a sequence of conditions. So, if the condition is met, do whatever, if the condition is not met, then proceed out of the condition block, into another condition. However, while this supports many conditions, people report having performance issues when flow has 20-30 actions, which you'll probably run into. Alternatively, you could use a compose action, with a giant set of nested if statements. (see the docs for the if function here).

 

Personally, I have a strong dislike of those sorts of nested if statements. They're too difficult to get working, and too difficult to figure out what I did later on. For this sort of complicated condition, I'd go with an Azure Function. You get the additional complexity of having to create and maintain the function, but dealing with the conditional logic will be much easier there, IMO. 

 

 

View solution in original post

3 REPLIES 3
Mike2500
Level 8

Re: Flow multiple conditions

So, you have a whole bunch of conditions to return the proper case number. Flow can do nested conditions, but it's a pain to work with a single nested condition, let alone the amount you have. Another strategy is to use a sequence of conditions. So, if the condition is met, do whatever, if the condition is not met, then proceed out of the condition block, into another condition. However, while this supports many conditions, people report having performance issues when flow has 20-30 actions, which you'll probably run into. Alternatively, you could use a compose action, with a giant set of nested if statements. (see the docs for the if function here).

 

Personally, I have a strong dislike of those sorts of nested if statements. They're too difficult to get working, and too difficult to figure out what I did later on. For this sort of complicated condition, I'd go with an Azure Function. You get the additional complexity of having to create and maintain the function, but dealing with the conditional logic will be much easier there, IMO. 

 

 

View solution in original post

Doru
Level: Powered On

Re: Flow multiple conditions

Thanks for your time/reply

I did my own research first, docs, youtube tutorial videos, I also tried a few times to make the flow starting froms cratch, but when i got to about 12 conditions, not to mention approval mails and mails sent + updating items from sharepoint... I realised i`m not even half way there and anyway flow doesnt work as intended 🙂

Highlighted
nchambe
Level: Power Up

Re: Flow multiple conditions

Flow has now improved their condition control to allow more complex nested if/then statements and such using the visual builder. I wrote about it here: https://sharepointlibrarian.com/2019/02/05/flow-now-supports-multiple-condition-controls-for-advance...

Helpful resources

Announcements
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 (1,156)