Weekly submitting of a file to a Document Library

%3CLINGO-SUB%20id%3D%22lingo-sub-2928597%22%20slang%3D%22en-US%22%3EWeekly%20submitting%20of%20a%20file%20to%20a%20Document%20Library%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2928597%22%20slang%3D%22en-US%22%3E%3CP%3EGoal%20-%20check%20if%20a%20file%20has%20been%20uploaded%20in%20over%20a%20weeks%20time%20after%20the%20other%20uploaded%20file%20was%20uploaded%20by%20the%20same%20person%20yet%20will%20have%20a%20different%20file%20name.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStart%3A%3C%2FP%3E%3CP%3EPeople%20fill%20out%20a%20Microsoft%20Forms%20form%20with%20an%20attachment%20(file)%20and%20other%20metadata.%3C%2FP%3E%3CP%3EI%20create%20a%20file%20(from%20the%20uploaded%20Forms%20one)%20into%20a%20Document%20Library%20in%20SharePoint%20Online%20with%20that%20associated%20metadata.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIssue%3A%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20the%20logic.%26nbsp%3B%20I%20can%20get%20a%20calculation%20item%20to%20show%20that%20the%20file%20has%20been%20submitted%20on%20date%20x%2C%20yet%20I%20am%20trying%20to%20figure%20out%20how%20to%20know%20that%20John%20Doe%20uploaded%20a%20file%2001%2F01%20and%20then%20on%2001%2F08%20uploaded%20another%2C%20so%20that%20is%20a%20week%20apart..great.%26nbsp%3B%20If%20OLDER%2C%20then%20an%20email%20goes%20out%20to%20that%20person.%26nbsp%3B%20I%20can%20surely%20figure%20that%20out.%3C%2FP%3E%3CP%3EJane%20Doe%20uploads%20another%20file%2012%2F1%20and%20then%20on%2012%2F6%20uploads%20another%20one%2C%20that's%20not%20exactly%20a%20week.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20that%20I%20can%20build%20an%20array%20of%20people%20and%20the%20date%20that%20they%20submit%20and%20can%20check%2C%20just%20not%20sure%20how%20to%20go%20about%20getting%20counters.%26nbsp%3B%20There%20will%20be%20a%20LOT%20of%20people%20submitting%20files%20on%20a%20weekly%20basis.%3C%2FP%3E%3CP%3EI%20don't%20know%20how%20to%20get%20it%20so%20that%20when%20a%20new%20person%20submits%20a%20file%2C%20it%20is%20checking%20if%20they%20are%20new%20and%20if%20not%2C%20then%20to%20set%20a%20status%20to%20something.%26nbsp%3B%20Then%20to%20somehow%20keep%20track%20of%20files%20that%20are%20two%20weeks%20or%20three%20weeks%20old%20and%20needed%20for%20archive%2C%20yet%20not%20%22counted%22%20as%20it%20is%20only%20the%20current%20week%20and%20the%20one%20before.%3C%2FP%3E%3CP%3EThank%20you!%3CBR%20%2F%3EMatt%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2928597%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2938518%22%20slang%3D%22en-US%22%3ERe%3A%20Weekly%20submitting%20of%20a%20file%20to%20a%20Document%20Library%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2938518%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F109565%22%20target%3D%22_blank%22%3E%40Matthew%20Carter%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20able%20to%20maintain%20a%20SharePoint%20List%20in%20addition%20to%20the%20Document%20Library%2C%20I%20would%20suggest%20having%20a%20list%20item%20for%20each%20person%20with%20a%20column%20which%20stores%20the%20date%20of%20the%20most%20recently%20uploaded%20file.%20Let%20call%20this%20column%26nbsp%3B%3CEM%3ELastUploadDate%3C%2FEM%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assume%20you%20have%20a%20flow%20which%20is%20triggered%20by%20form%20submissions%20and%20use%20this%20to%20write%20the%20uploaded%20file%20to%20your%20document%20library.%20You%20can%20use%20this%20flow%20to%20add%2Fedit%20entries%20in%20the%20new%20list%20to%20keep%20the%20LastUploadDate%20column%20up%20to%20date.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20then%20have%20a%20flow%20triggered%20daily%20to%20query%20the%20list%20for%20any%20entries%20where%20LastUploadDate%20is%20older%20than%207%20days.%20The%20result%20of%20this%20query%20is%20the%20list%20of%20people%20you%20need%20to%20send%20notifications%20to.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20new%20list%20could%20also%20record%20when%20the%20reminder%20notification%20was%20last%20sent%20out%2C%20allowing%20you%20to%20avoid%20sending%20duplicate%20notifications.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPresumably%2C%20when%20someone%20leaves%20your%20organisation%20you%20don't%20want%20to%20send%20them%20notifications%20about%20their%20late%20form%20submission.%20In%20this%20case%20you%20can%20remove%20them%20from%20the%20new%20SharePoint%20list.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2977807%22%20slang%3D%22en-US%22%3ERe%3A%20Weekly%20submitting%20of%20a%20file%20to%20a%20Document%20Library%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2977807%22%20slang%3D%22en-US%22%3EHello%20I%20am%20having%20trouble%20figuring%20out%20this%20logic.%20Would%20I%20create%20a%20separate%20column%20from%20the%20Created%20By%20column%20which%20exists%20and%20the%20Date%20Submitted%20Column%20which%20I%20have%3F%20I%20don't%20know%20how%20to%20group%20them%20together%20in%20say%20an%20array%20or%20something%20to%20check.%3CBR%20%2F%3EI%20appreciate%20the%20assistance%2C%20I%20am%20just%20having%20trouble%20understanding%20the%20specifics%20of%20it%20to%20get%20it%20to%20work.%20I%20know%20what%20I%20want%20to%20do%2C%20it%20is%20getting%20it%20to%20work%20in%20Power%20Automate.%3CBR%20%2F%3EThank%20you.%3CBR%20%2F%3EMatt%3C%2FLINGO-BODY%3E
Contributor

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

 

5 Replies

Hi @Matthew Carter 

 

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.

Hello 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

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.

Thank you. I DO appreciate your taking the time to write to me! I DO! THANK YOU!

I have a Microsoft Lists and called it Submission Tracker and my issue is sadly HOW do I do this?
How do I keep track of the persons that have submitted already and maybe a unique field? if so, how do I account for that? I don't know how to check a column to see who all is in it and then if they are in the list or column, then overwrite it.
I thought to create a variable array to somehow grab the column with the person's name, maybe the Created By field and put that into an array - not sure exactly how, and then check if it is in that array. If NOT, then add it and then append to the array - however that might be only one time.
This is where I get frustrated and confused.

Hi @Matthew Carter 

 

Don't worry about arrays, I don't think you need them.

 

I think we might be structuring our lists differently as I'm not quite sure where you're hitting problems. Perhaps an example of what I did might help.

 

1. I created a new communication site called Submissions.

 

2. On the Submissions site I created a new list called Submission Tracker. I'm using the Title column of the list to store the email addresses of the people making the submissions. I'm assuming you have an email address included in the form submission. If you restrict the form to people in your organisation then you will get their email address in the Responder field.

 

I added a DateTime column called Last Submission Date.

 

Both Title and Last Submission Date were configured to require unique values and to have indexes.

 

3. I created a new Power Automate flow called Submit Form Handler, triggered by new submissions to the form.

 

The first three actions of the flow are shown below.

 

Our aim is to see if we already have an item in the Submission Tracker list for the user making the submission. We are storing email addresses in the Title column.

 

The third action is used to retrieve items from the Submission Tracker list. The important properties are Filter Query and Top Count. Filter Query is used to query the list for any items where the Title column matches the email address of the user making the submission. 

 

flow-search-item.png

 

The next action is a Condition where we test if any items were found by our above Get Items query. If the collection of items returned by the query is empty then we need to create a new item, otherwise we will update the existing item. 

 

Whether creating a new item or updating an existing item, we write the form's submission timestamp as the Last Submission Date column.

 

 

flow-create-or-update-tracker.png

 

It can be difficult to see what formula is in use for the condition.

left part:    empty(outputs('Get_items')?['body/value'])

operator:   is equal to

right part:   true

 

Setting formulas can fiddly, it might take a bit of time to figure out how to enter them in to Power Automate correctly.

 

The aim of the above condition is to see if the array of results from the Get_items action is empty.

 

You should be able to add the above actions to your existing power automate flow for uploading documents to the submission document library.

 

Once you are able to get the Submission Tracker list populated, then you can turn your attention to querying the list every day to see if any email addresses have a Last Submission Date older than 7 days.

 

Good luck :)