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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,810)