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.
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!
Solved! Go to Solution.
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?
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 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.
Grateful for any help you can give.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!