Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Filter data source based on 2 fields

Posted on 4 Dec 2024 19:57:34 by
This has been frustrating me for 2 days and various searches have not yielded help - a couple have seemed close, but still not quite getting this working.
 
The data source is working and I can output the expected array as needed. Just the bit trying to reduce the list down to "expired" rows has me baffled.
 
Basically,
A Form populates an Excel sheet. The Flow will run once a day to...
For all rows with an integer in the 'Status' column
Take the date in the "Start' column
Perform an addDays on Start using Status (or [negative] -addDays on the current date)
Where the result is less than the current date, put the record into an array & send it to me
 
The problem is that the filter either gives me all the records with an integer in Status, regardless of the result relative to the current date, or it says addDays can't add Null to a date.
I think the following is what I started with in a Filter Array. Honestly, this middle part has been through so many iterations using Compose, Filter Array, Select, etc. that I'm not sure if this is possible.
 
@less(formatDateTime(item()?['Start'], 'yyyy-MM-ddT00:00:00.000Z'), formatDateTime(addDays(utcNow(), -int(item()?['Status'])), 'yyyy-MM-ddT00:00:00.000Z')))

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,372

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,900

Leaderboard