cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kssaran
New Member

Update folder properties when file added or modified

Hi, I am a newbie to Flows and trying to do create my first flow for the below requirement:

 

We have a Sharepoint library with multiple folders and each folder has multiple files. There is a custom field on each file called "Expiration Date". We capture the latest of all "Expiration Date" as "Expiration Date" for the folder it is in. This is currently being done manually - once we add/modify a file in folderx we set the "Expiration Date" of that file to X. Then we order all the files in that folder by "Expiration Date", take the latest value and update the folder's "Expiration Date" (if required).

 

I am trying to build a flow to automate this. Since there are existing files and folders already have value of "Expiration Date" i thought may be all i have to do is compare "Expiration Date" of new/modified file with folder's and only update the value if the file's "Expiration Date" is later than the folder's.

 

I tried to build the flow "when a file is created or modified (properties only). Added the Sharepoint Site, library name etc. Added a step to update "Expiration Date" and tried to create a condition to compare file's "Expiration Date" field with the folder's. Can't figure out how to compare these two value and also unable to find out how i can update the "Expiration Date" of a particular folder.

 

Any help on this is appreciated. 

 

Regds,

SK

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

Hi @kssaran,

 

I am afraid using this trigger will not work for the files within a folder.

Currenlty this trigger is only available to get the updated files, and it is not working for folder.

So the scenario you mentioned may not working using the current Flow trigger.

There are ideas submitted for folder trigger:

SharePoint Trigger by folder

 

Regards,

Michael

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

Thanks for your reply Michael

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,823)