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

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
Highlighted
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
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
Level: Powered On

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
Level: Powered On

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
Level: Powered On

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
Level: Powered On

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

Highlighted
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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 379 members 4,701 guests
Please welcome our newest community members: