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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,825)