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

issues with using multiple AND/OR Conditions

Hi 

 

I have a flow that should Check Individual Statuses (32 in count) from a Sharepoint list and accordingly mark the overall Status to Complete and send and email on Successful update. 

 

I have been able to work with individual four Statuses but beyond 8 the flow doesnt allow me to add any More. I created Individual groups with these Statuses but it didnt work too . 

 

prisharm_0-1595601731150.png

 

The above flow works since I wanted to check if the condition with fewer fields work or not. But if I add more of these individual fields in AND condition it doesn't work . Is there an alternative to check all these status and mark overall status as complete.

 

Thanks for your help in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: issues with using multiple AND/OR Conditions

There is a limit to how many If() statements you can nest.  I believe the limit is 7.  So even though you only have one condition action it counts each check inside the condition toward that limit.  So I don't think you can add more than 6-7 conditions to any IF.  The workaround would be to break the if statement into two IF's   In the first check the first 6 fields as you are doing now.  Then under the YES side of the condition add another condition that checks the next 6.  If both conditions evaluate to yes do the Yes side of your original condition.  If not do the NO side.  I haven't specifically tested that scenario, but I believe it will work.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

11 REPLIES 11
Highlighted
Super User III
Super User III

Re: issues with using multiple AND/OR Conditions

hi @prisharm  you are doing it well, What I recommend you is please add a string expression in the left side of your condition comparetion like this

 

string('HERE YOUR COLUM PROPERTIE')

 

then in your right side

 

string('Incomplete')

 

and thest your flow.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

Hi @ChristianAbata 

 

Thanks for your response. I might have stated the issue incorrectly but the below flow works perfectly if I only add 5-6 AND Condition on these statuses. I have to add total of 33 similar  Conditions e.g. If Status 1 is not equal to "incomplete"

,Status 2 is not equal to "incomplete"

:

:

Status 16 is not equal to "incomplete",

:

:

Status 32 is not equal to "incomplete".. If True , Mark Overall Status = Complete Else Terminate 

 

I was able to add these many status fields in AND /OR Condition by grouping these however it doesnt work

 

Hope I have been able to explain the issue 

Highlighted
Super User III
Super User III

Re: issues with using multiple AND/OR Conditions

@prisharm  the status has a diferente name or is the same?

Because if is the same you can use apply to each to do every one, but if are different you need to add it one by one in a condition as you are doing now.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Dual Super User III
Dual Super User III

Re: issues with using multiple AND/OR Conditions

There is a limit to how many If() statements you can nest.  I believe the limit is 7.  So even though you only have one condition action it counts each check inside the condition toward that limit.  So I don't think you can add more than 6-7 conditions to any IF.  The workaround would be to break the if statement into two IF's   In the first check the first 6 fields as you are doing now.  Then under the YES side of the condition add another condition that checks the next 6.  If both conditions evaluate to yes do the Yes side of your original condition.  If not do the NO side.  I haven't specifically tested that scenario, but I believe it will work.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

@ChristianAbata 

 

All the fields have different Names. These are all different fields reflecting Status against different parent fields in sharepoint list. The content for all Status fields are same though. Each Status field is a choice field with options like "Completed", "Incomplete", "Not Required"

 

Thanks 

Highlighted
Super User III
Super User III

Re: issues with using multiple AND/OR Conditions

@prisharm  unfortunally you need to add it one by one, and please be carefull about what @Pstork1  says, you have a limit there.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

@Pstork1 

 

thanks for your inputs. Yes, I believe there is a limit , as I was adding these columns , the flow allowed me to add rows upto 10 fields and then it got disabled. As a workaround for this , I added set of four status against each parent field in sharepoint list as a group. So i added 8 groups of AND statements checking similar condition. It did allow me to add it in this manner but the flow didnt run successfully. even though the If condition should have returned false and should have terminated , it still had evaluated it to true and update the overall Status to complete. Which is incorrect as per my logic 

 

I will try what you suggested. Have a question though, does the flow internally evaluate these conditions in an order as these are stated or in a random order ? e.g. The first And condition would be evaluated first followed with second and so on ?

 

Thanks 

Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

@ChristianAbata , I am adding these one by one but it doesn't seem to work. because of some intrinsic limit ,i believe. 

Highlighted
Dual Super User III
Dual Super User III

Re: issues with using multiple AND/OR Conditions

I don't believe they are evaluated in any particular order.  But All of the conditions in a single group will be evaluated before it moves on.  So it doesn't really matter if they are in an order or not.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

Thanks @Pstork1  for the confirmation. I will give it a try the solution that you suggested and update accordingly.

Highlighted
Helper II
Helper II

Re: issues with using multiple AND/OR Conditions

@Pstork1 , I created the flow as you suggested and it worked. Thanks for your help 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,862)