Hi,
I have request via power automate get file properties only from Sharepoint, but I should filter out specific file.
From get files properties only I can get file created date, BUT I need filter out only files, which have current date = target date, but target date = file create date + 5 working days.
In Sharepoint I have list with files, which created in 14/09, 15/09, 18/09, 19/09, 20/09 etc., Today = 22/09, that mean with function get files only properties I should receive ONLY files, which created in date 15/09.
File create date = 15/09 + 5 working days = 22/09 = current date
How to set-up this via Filter Query?
You can look at all the expressions in the Microsoft documentation.
utcNow returns the current time stamp.
addDays adds the amount of days you provide.
-7 in that case takes you Bach 7 days.
startOfDay gives you the time stamp of the beginning of the day provided.
And we agreed that you don’t need to check for the weekday.
@Matthy79 please is it possible a little bit explain more details this expression, what mean each of these numbers like -7, 6, -6, -6? Thanks in advance!
Hello @slvedva,
if you read your request and the provided solution from @ManishSolanki it is exactly what you requested.
From the other topic I remember that you also have a filter of a specific user. If you put those filters together (using and) it will work for you.
Try to combine those 2 filters and if it doesn’t work, provide what you tried.
@Matthy79 yes, but it's nothing related to file create date. It's just calculate 5 working days from current date and output system give 19-09-2023, BUT when get file filter by created 19-09-2023, the output is empty, because in my example files created in 12-09-2023. And I can't use input date, because flow is scheduled and run every day.
In compose I put this formula:
There are always a lot of ways.
In your special case (since holidays don't matter) you could always check for current day -7. You already have a perfect solution provided by @ManishSolanki. Just use -7 and -6 instead of -5 and -4 from his first post.
Of course you could also create a flow that is triggered when a new file is added and after that wait for 7 days and check if the file has been updated but the flow setup would be completely different.
@Matthy79 maybe there are some possibility create additional flow, when file is created, system update file some field with some notification date, which calculate create date + 5 working days and which later can be used for filtering?
Hi @Matthy79
Sorry my mistake and you are correct
13-09-2023 - yes, it's working day 1
14-09-2023 - working day2
15-09-2023 - working day3
18-09-2023 - working day4
19-09-2023 - working day5 and flow I run automatically every working day. In my case don't matter holidays, I talk 5 working days in week.
Honestly I don’t understand the explanation. Let me explain the problem I have. Tried to add comments in red.
In your example the files are created 12-09-2023 (Tuesday)
When flow run 12-09-2023 and get files it is the same day so no working day in between;
when flow run 13-09-2023 (Wednesday) and get files it is the next working day (day 1);
Why do you leave out 14-09-2023 (Thursday). This would be day 2
when flow run 15-09-2023 (Friday) and get files it is day 3;
16 and 17 are Saturday and Sunday (no working days so no count)
when flow run 18-09-2023 and get files, system filter all created files. I don’t under why this is day is day 5 for you. For me it is working day 4
when flow run 19-09-2023 and get files, system don't filer anything; (for me this would be the 5th working day)
when flow run 20-09-2023 and get files, system don't filer anything etc;
Also a big problem with working days is that there are different holidays in each country. You will have to match everything against your holidays.
Hi @Matthy79
Maybe you can help with my issue? Thanks.
Maybe I need more detail describe situation.
This flow I plan schedule automatically every working day and when flow run, system should check SharePoint files create date and 5 working days after file creation system will send out reminder, that mean when get files, it should filter files 5 working days after creation in other days don't filter at all.
Try describe example:
I have files created in 12-09-2023
When flow run 12-09-2023 and get files, system don't filter anything;
when flow run 13-09-2023 and get files, system don't filer anything;
when flow run 15-09-2023 and get files, system don't filer anything;
when flow run 18-09-2023 and get files, system filter all created files;
when flow run 19-09-2023 and get files, system don't filer anything;
when flow run 20-09-2023 and get files, system don't filer anything etc;
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2