The company I work for holds contract documents for all our clients in SharePoint using a document library. We have been organizing document using folders AND we want to start using metadata to better organize documents.
We have hundreds of documents in this document library and we don’t want to have to go through each document to update the column value (metadata).
So, say I have a folder named Fruit and within that folder there are subfolders named: apple, banana, pear. I have a column (metadata) in the document library to specify the color. I want to update the “color” column value for all documents in banana folder to “yellow”.
Is there a way to update ALL document’s metadata in a select folder with a given value?
@TKrause5the short answer is yes....
I suggest using a Button trigger to start the Flow (this is just a one time update).
Then, use a switch statement inside of a for each loop to check the Folder Path. If the Folder Path contains, for example, Apple, update the file appropriate metadata column to yellow using the Update File Properties action to Green.
If you have more than 5000 documents, there are other considerations.
Let me know if you want an example.
Before I respond further, are you averse to configuring and using SharePoint default column values?
Also, is there version history that you need to keep?
The reason I am asking is that, going forward, you can use column default values to automatically populate metadata columns based on the folder. That will mean that your users won't need to populate the columns.
If you want to use column default values, a simple way to do this might be to simply create a new copy of each document in the library (via Flow) and delete the original. Doing so implies that the version history will be lost.
My original idea of using a switch statement won't work well for a variety of reasons, but using conditions/if statements will work. The problem is that it will be a long and ugly Flow.
There are other ways to approach this as well.
That said, the easiest way would be to configure column default values and copy/delete as I explained above.
Will this work for you?
First off thanks for your response,
So, I do see what you’re saying about default columns and that is an option.
I am hesitant because the document library contains very secure documents that have been in this location for years AND getting rid of the version history would not be ideal in this case.
Check out the winners of the recent 'Can You Solve These?' community challenge!
Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.
Features releasing from October 2020 through March 2021
Fill out a quick form to claim your user group badge now!