web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / A SharePoint List Filt...
Power Automate
Unanswered

A SharePoint List Filtered Array and Sending emails

(0) ShareShare
ReportReport
Posted on by 133

I have a flow which filters a SharePoint List down to a required subset, using OData Filter and then Filter Array. If I end with a Compose Length(Item) I get the number of items I estimated. Great so far.

 

I now need to take that subset and look at field 'Status'....if it's 'Due Now' I want to send and email...if it's 'Overdue' I want to send a different email. So now I want to add a Condition that says if Status is 'Due Now' take the YES branch, if not take the NO branch...but once I have a Filter Array all I can choose in the condition is ITEM or BODY....I can't see Status unless I pull it from GET ITEMS stage which is pre-filtering and therefore not what I want.

 

psadd2_1-1631712548124.png


If I can understand how to reference the correct field from within the Filter Array this will let me control the Condition...and also add the relevant 'dynamic' information to the body of the emails and the deep linking that I need to do.

 

Please help me from throwing my PC out of the window!

 

Thanks

 

Paul

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    I would take a slightly different approach, instead of having a condition inside of your loop. Modify your original filter so that it filters for Update Status = Good AND Status = Due now. Then add another filter action, again on the results of the original get items which is Update Status = Good and Status <> Good.

     

    You will then have two filtered arrays, containing only the data you are interested for a particular action and you wont need to have a condition within your loop. Does that make sense? 

  • psadd2 Profile Picture
    133 on at

    Thanks for the prompt reply....it kind of makes sense.

    The reason I don't have the Status filtered in the OData part is because it's a Calculated field in my List and you can't use those in the OData filter....so I filter what I can and then proceed to filter the results further. Actually I want to ignore the GOOD...don't need to email them at all...it's the DUE NOW and OVERDUE that need the reminder emails.
    I just can't see how I can reference any specific field when the only thing I get back from a Filter Array is ITEM and BODY so even splitting the filters as you suggest still leaves me with the same issue....I think.

     

    Thanks

  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    You can use item()['fieldname']

  • psadd2 Profile Picture
    133 on at

    ah....let me give that a whirl......thanks

  • psadd2 Profile Picture
    133 on at

    Hi Paulie78,
    Thanks for your interest and help previous...but I'm still stuck. I've gone down the route of branching the flow, as you can see in the image. One side the Filter Array on 'Due Now' the other 'Overdue'. If I stick in a Compose Length Body after the filters I get the correct number back. 9 Due Now and 1 Overdue. What I need to do is to send and email to each of the 9 Due Now and the 1 Overdue but I can't seem to make the 'Apply to Each' control work. At the moment I'm sending myself all the emails...if I can get that working then I really need to tailor each email to the people/projects in each item.

    psadd2_0-1631789911083.png

    Grateful for any help you can give.

     

    Thanks

     

    Paul

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard