cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThimiosSp
Helper III
Helper III

Add filter from column field

Hi Everyone!

I have a flow on a SharePoint list with social media content articles list. Some of these articles are published (column Status = Published) others are not (column Status = Planned). All articles have a PublishedOn date field filled.

My flow sends everyday at 15:00 a reminder when an article is on the list to be Published on the next 2 days. Everything works great but I need to make this work only for items that Status field is equal to Planned.

I would appreciate your assistance.

1.jpg2.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

There is still a small error in your configuration. Like I mentioned in step 2 in my previous response, the email notification has to be outside of the apply to each loop. But make sure it's still within the If No box.

 

 

outside_applytoeach.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

For the has failed scenario you could use the run after setting

 

1. Click the ... on the Couldn't send a reminder action and click configure run after

somethingwentwrong_runafter.png

 

2. Only select the has failed option.

hasfailed_runafter.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

28 REPLIES 28
Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

You have two options. I have created two examples below. Replace the Status column name by your column name.

 

Option 1. Use a filter query in your Get Items action

Status eq 'Planned'

filterquerystatus.png

 

Option 2. Add a row to your Condition action

statusequaltoplanned.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


ThimiosSp
Helper III
Helper III

Thank you @Expiscornovus 

1. For option 1, Status is not available to choose from the Dymanic content. How could it be inserted in the filter query shown below?

1.png

 

2. I do not understand how this row can be added. Can you pls send that in more details?

Thank you!

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

If you already have a filter query option 2 is probably easier.

 

1. Click on the Add button, click add row

addarow.png

 

2. In the new row that appears select the left column and click add Dynamic content. Select your status field.

adddynamiccontent.png

3. Select your operator (Is equal to) and type the value in the right column you want to compare it to, in this case Planned

selectoperator.png

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


ThimiosSp
Helper III
Helper III

Hey @Expiscornovus ,

I'm probably making your life hard with that, but the only filter I have, does not allow for adding a row.

1.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Can you switch the condition action to basic mode?



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


ThimiosSp
Helper III
Helper III

I'm afraid not @Expiscornovus . I get an error.

1.png

 

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Sorry, apologies. I now see you are still using the older interface with doesn't have the add rows. 

 

Probably an easier alternative approach is to add a new condition action right before the append to string variable action within the apply to each loop.

 

rightbeforeappendtostring.png

 

Configure that action to use the Status is equal to Planned condition.



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Is this close to what you're suggesting @Expiscornovus ?

1.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Yes, that was what I was suggesting 🙂



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


ThimiosSp
Helper III
Helper III

I'm close to a nervous breakdown ;). Here's what I get now @Expiscornovus 

1.png

 

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

No worries, we will figure it out together 🙂

 

Looks like you have two items in your list. The condition we have added will check the condition for every item from the Get items list.

 

Can you navigate to the second item (via the next button) and see if for that item the expression result is false? 

 

twoitems.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


ThimiosSp
Helper III
Helper III

Hi @Expiscornovus,

Both these items satisfy the condition (Status = Planned). 

Here is a part of my SharePoint list.

1.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Thanks for sharing that screenshot. I now see that you are using a column of type choice. With a choice field it works a bit differently. The structure of a Choice field value normally looks a bit like this.

 

{
  "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  "Id": 0,
  "Value": "Planned"
}

 

So in your example we want to use the value of the Status field in your condition. We can achieve this by using an expression instead of the status field.

items('Apply_to_each')?['Status/value']

 

statusvalue.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thank you @Expiscornovus,

I've replaced the condition as per your suggestion but I still get the same issue.

1.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Can you share a screenshot of your current configuration of the Condition 2 action, just to double check? 

 

I also noticed a small typo in one of your earlier screenshots. It says Planneinstead of Planned. 

smalltypo.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus,

1. What an eye, that was a typo.

2. After fixing the typo, I get 2 email notifications:

- Reminder with all posts regardless Status

- Reminder for 1 Planned post and one Published post (right now there are 2 Planned and on Published posts within the next 2 day period).

I'm attaching the whole thing for you.

1.png

 

2.png

 

3.png

 

4.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Based on the screenshots of your SharePoint list earlier and the configuration I would expect 2 email notification messages from the send me an email notification action, one for each planned item. That's currently happening, correct?

 

In regards to the content of the notification messages, can you show us how you configured those and can you also tell us what you are expecting as the end result?

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus ,

Original flow (which is used as a template) sends one notification email including all posts selected. Why would you expect 2 email messages?

Message should be the following, with the right posts filtered ;). Are you covered?

 

 

1.png

Expiscornovus
Super User
Super User

Hi @ThimiosSp,

 

Thanks for clarifiying. I thought you wanted a reminder for each individual item. But you want a summary e-mail 🙂

 

I believe when the new condition was added some of the actions got rearranged.

 

1. Try and move the append to array action within the No section of your Condition 2 action

2. Move the send an email reminder to just below the yes/no. Make sure it's outside of the apply to each, but within the No of your first condition action.

 

rearrangeactions.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,449)