cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlrichardson
New Member

AND conditions not all applying in Flow

Hi all,

 

I'm trying to put together a scheduled flow to Get Data from a SharePoint list and send an automated email to the person in charge of each record IF the record's Estimated Completion Date is <= today AND Status is NOT equal to 3 or 5 (3=completed, 5=cancelled).

 

I have the Get Data set up and working fine to grab my list data, and set up an ApplyToEach function to apply my conditions to each record retrieved.

 

I also have the email configured and working as I want, but my issue arises with the Status condition. It seems like no matter how I structure it (multiple rows in a single condition, or stacking conditions in the Yes action), emails are still being sent for projects with status 3 and 5. Below is the current setup I have, separating the conditions. What am I doing wrong with my second condition that is making it still send the email if the status=3 or status=5?

Annotation 2019-10-28 083446.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: AND conditions not all applying in Flow

 

Hi @jlrichardson ,

 

What is the type of the Status field? If it is Choice, then you need to use the Choice value as a parameter.

If its type is string, then you need to use the string() function to format 3 and 5.

47.PNG

Hope it makes sense.

 

Best Regards,

Community Support Team _ Barry
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

4 REPLIES 4
Dual Super User
Dual Super User

Re: AND conditions not all applying in Flow

For Condition 2 swap your Yes and No actions and then change the condition to status equals 3 OR status equals 5.  That way if its either 3 or 5 it will do the yes actions (which will then be blank) otherwise it will do the No.



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

Re: AND conditions not all applying in Flow

@Pstork1 , I tried that and the email is still sending for records with statuses 3 and 5. Any other ideas why my AND status condition isn't functioning as it should?

Community Support
Community Support

Re: AND conditions not all applying in Flow

 

Hi @jlrichardson ,

 

What is the type of the Status field? If it is Choice, then you need to use the Choice value as a parameter.

If its type is string, then you need to use the string() function to format 3 and 5.

47.PNG

Hope it makes sense.

 

Best Regards,

Community Support Team _ Barry
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

Highlighted
jlrichardson
New Member

Re: AND conditions not all applying in Flow

@v-bacao-msft  - Thanks! I had created a new, calculated column of type number to try to use the "is equal to" and the int number value and I think that is what wasn't working. I used your suggestion and updated my conditions for status to be "contains" and then a string(3) / string (5) expression for the filter value and it's WORKING!! 🎉

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,043)