cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tbruns
Post Patron
Post Patron

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

@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
ScottShearer
Super User
Super User

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

Urgent is a choice column

@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

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

@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

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

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

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

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (923)