Forum Discussion
Weekly submitting of a file to a Document Library
Goal - check if a file has been uploaded in over a weeks time after the other uploaded file was uploaded by the same person yet will have a different file name.
Start:
People fill out a Microsoft Forms form with an attachment (file) and other metadata.
I create a file (from the uploaded Forms one) into a Document Library in SharePoint Online with that associated metadata.
Issue:
I am trying to figure out the logic. I can get a calculation item to show that the file has been submitted on date x, yet I am trying to figure out how to know that John Doe uploaded a file 01/01 and then on 01/08 uploaded another, so that is a week apart..great. If OLDER, then an email goes out to that person. I can surely figure that out.
Jane Doe uploads another file 12/1 and then on 12/6 uploads another one, that's not exactly a week.
I know that I can build an array of people and the date that they submit and can check, just not sure how to go about getting counters. There will be a LOT of people submitting files on a weekly basis.
I don't know how to get it so that when a new person submits a file, it is checking if they are new and if not, then to set a status to something. Then to somehow keep track of files that are two weeks or three weeks old and needed for archive, yet not "counted" as it is only the current week and the one before.
Thank you!
Matt
- DanWatfordCopper Contributor
If you are able to maintain a SharePoint List in addition to the Document Library, I would suggest having a list item for each person with a column which stores the date of the most recently uploaded file. Let call this column LastUploadDate.
I assume you have a flow which is triggered by form submissions and use this to write the uploaded file to your document library. You can use this flow to add/edit entries in the new list to keep the LastUploadDate column up to date.
You can then have a flow triggered daily to query the list for any entries where LastUploadDate is older than 7 days. The result of this query is the list of people you need to send notifications to.
The new list could also record when the reminder notification was last sent out, allowing you to avoid sending duplicate notifications.
Presumably, when someone leaves your organisation you don't want to send them notifications about their late form submission. In this case you can remove them from the new SharePoint list.
- Matthew CarterIron ContributorHello I am having trouble figuring out this logic. Would I create a separate column from the Created By column which exists and the Date Submitted Column which I have? I don't know how to group them together in say an array or something to check.
I appreciate the assistance, I am just having trouble understanding the specifics of it to get it to work. I know what I want to do, it is getting it to work in Power Automate.
Thank you.
Matt- DanWatfordCopper Contributor
Hi Matthew Carter ,
I think you might be running into problems if you are trying to manage this process solely within the Document Library.
My suggestion is that you make use of a NEW SharePoint List in ADDITION to the SharePoint Document Library you are already using. As an example, lets call this new list Submission Tracker.
This new Submission Tracker list would have only one List Item per person. When someone submits a new form response you would create or update the corresponding List Item for that person in the Submission Tracker list and set the LastUploadDate column to the current date.
You then set up a Power Automate flow to run every day which queries the Submission Tracker list for all people where the LastUploadDate column value is older than 7 days. The result of this query contains the people you need to send notifications to.
Hopefully that makes a bit more sense, but please come back to me if not.