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

Flow containing two condition and if both exist then send email

I have a flow set up that will email me if the date created equals today's date.

@equals(items('Apply_to_each_2')?['Date1'], utcNow('yyyy-MM-dd'))

No issues with that.

 

Now I am needing to add another condition and not sure how to do it. I have a column titled Urgent (choice column) and if  the date1 = today and the Urgent column = Urgent then send email.

 

How would I write this expression?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Flow containing two condition and if both exist then send email

@Tbruns:

 

Your completed Flow should look something like this (if I understand your requirement correctly):

MultipleConditions2.jpg 

 

You'll need to configure the Get Items filter in the way that I previously outlined.

Also, note the email setting for "Is HTML" is set to yes so that your table will display properly.

 

You don't need the variable - I was just using that to illustrate my point.

 

If this addresses your issue, please mark your post as Solved.

 

Scott

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

Scott

View solution in original post

9 REPLIES 9
Super User
Super User

Re: Flow containing two condition and if both exist then send email

What Type of column is Urgent?  Choice?  Lookup?  Text?

 

Alos, how is your Flow being triggered?  Recurrence? New or Changed Item?

 

I am assuming that your are talking about a SharePoint list.

 

Scott

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

Scott
Tbruns Helper IV
Helper IV

Re: Flow containing two condition and if both exist then send email

Urgent is a choice column

Super User
Super User

Re: Flow containing two condition and if both exist then send email

@Tbruns:

How is your Flow being triggered?

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

Scott
Tbruns Helper IV
Helper IV

Re: Flow containing two condition and if both exist then send email

Sorry I should have attached this.12-17-2018 2-04-23 PM.jpg

Super User
Super User

Re: Flow containing two condition and if both exist then send email

@Tbruns:

For a variety of reasons, you are much better off filtering the SharePoint list items in the Get Items action using an OData filter.

Please see the screen shot below for the OData filter syntax.

 

Please not that when using OData filters and SharePoint, you need to use the SharePoint internal column name rather than the display name.  If there are no spaces on the column name, they will likely be the same.  To check, go to list settings and click on the column name.  What comes after ?Field= is the internal name.  Also, please note the single quotes around the values.

 

The Flow in the screen shot filters on the two columns you mentioned and runs successfully.

 

MultipleConditions.jpg

 

If this solves your issue, please mark your post as Solved.

 

Scott

 

 

 

 

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

Scott
Tbruns Helper IV
Helper IV

Re: Flow containing two condition and if both exist then send email

I went into the Library settings and clicked on the Column titled Urgent but I do not see ?Field=

Super User
Super User

Re: Flow containing two condition and if both exist then send email

Just use Urgent in the filter - exactly as you see it in SharePoint.

You should see it at the end of the URL when you click on the column name in list settings.

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

Scott
Tbruns Helper IV
Helper IV

Re: Flow containing two condition and if both exist then send email

Thank you! I added the  Date1 eq'@{formatDateTime(utcNow(), 'yyyy-MM-dd')}' and Urgent0 eq 'Urgent' in the filter query and it works however I did not remove any of the steps I had after "Get Items". Should I remove the rest of the flow and add initialize variable? If so what do I put in initialize variable. Sorry I am still learning. Thnak you

Super User
Super User

Re: Flow containing two condition and if both exist then send email

@Tbruns:

 

Your completed Flow should look something like this (if I understand your requirement correctly):

MultipleConditions2.jpg 

 

You'll need to configure the Get Items filter in the way that I previously outlined.

Also, note the email setting for "Is HTML" is set to yes so that your table will display properly.

 

You don't need the variable - I was just using that to illustrate my point.

 

If this addresses your issue, please mark your post as Solved.

 

Scott

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

Scott

View solution in original post

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 (6,993)