cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Doru
Advocate I
Advocate I

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
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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

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 🙂

nchambe
Regular Visitor

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,435)