cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JS1
Level: Powered On

SharePoint online listing files not accessed or modified over 7 days. Is it possible?

A site has been set up which holds users TimeSheets in XLS files. They are organised as such

 

https://tenant.sharepoint.com/sites/WEStaffFiles/Manager%20one/Forms/AllItems.aspx

 

 

Manager_1\Jane\TimeSheets\Timesheet for Annualisedhours2019.xls

                  \Tom\TimeSheets\Timesheet for Annualisedhours2019.xls

 

Manager_2\Fred\TimeSheets\Timesheet for Annualisedhours2019.xls

                  \John\TimeSheets\Timesheet for Annualisedhours2019.xls

etc.

 

The site owner is wanting to an email sending every week listing any xls document which has not been modified for over 7 days.

 

I've trying to building a flow to do this but i'm not getting anywhere quick. 

 

I can't even seem to get a list of just the XLS file from the root of https://tenant.sharepoint.com/sites/WEStaffFiles/ with the name of Timesheet for Annualisedhours2019.xls, all sorts of different files come back.

 

flow.png

 

Any help or a point in the right direction would be appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: SharePoint online listing files not accessed or modified over 7 days. Is it possible?

Hi @JS1 ,

 

Do you want to filter out files with “Annualisedhours2019.xls” in its list name?

 

In the Filter array function, please consider using dynamic content FilenameWithExtension.

 

I have made a simple flow likes below, which will filter out files that file name contains “Test”.

 

The function used in the Filter array is:

@and(contains(item()?['{FilenameWithExtension}'], 'Test'),equals(item()?['{IsFolder}'], false))

 

Hope this could be a reference for you.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Highlighted
Super User
Super User

Re: SharePoint online listing files not accessed or modified over 7 days. Is it possible?

Hello @JS1 ,

 

First think I suggest is to set new column in your document library where you store those files that will define what type of file is it. In your case you will set "Timesheet". In mpicture below I have column named "Document Type" and there is filled "Closing Protocol".

FlowHelp1.jpg

Then you are able to filter by this word when selecting all files properties from library. Option to pick this is Hidden under Advanced option that you can click.

FlowHelp2.jpg

So in your case if you will name column "DocumentType" and there will be filled "Timesheet" the whole query is:

DocumentType eq 'Timecheet'

This will return all such files.

There is returned for such file propertie called "Modified"

FlowHelp3.jpg

 

In your case you can use Filter to filter value with all files that was returned, first there is need to update this "Modified" date and time like this:

formatDateTime(item()?['Modified'], 'yyyy-MM-dd')

and compare it against this formula with "is equal to"

formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')

 In picture below I am filtering based on "Created" property.

FlowHelp4.jpg

 

Hope this helps.

 

BR
Pavel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team
Community Support Team

Re: SharePoint online listing files not accessed or modified over 7 days. Is it possible?

Hi @JS1 ,

 

Do you want to filter out files with “Annualisedhours2019.xls” in its list name?

 

In the Filter array function, please consider using dynamic content FilenameWithExtension.

 

I have made a simple flow likes below, which will filter out files that file name contains “Test”.

 

The function used in the Filter array is:

@and(contains(item()?['{FilenameWithExtension}'], 'Test'),equals(item()?['{IsFolder}'], false))

 

Hope this could be a reference for you.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 217 members 4,559 guests
Please welcome our newest community members: