Forum Discussion
vassp1980
Nov 25, 2024Copper Contributor
How do I apply retention label to a folder in a SharePoint library?
Hello All, Can you please advice how do I apply a "Retention label" (Created in M365 compliance centre) to folders in a Document Library? I created this retention label below I published thi...
vassp1980
Nov 27, 2024Copper Contributor
Hi
That worked.
I also needed to apply auto labelling policy based on a certain condition.
Condition --> When a folder name is "Finance", then auto apply the label "Indefinite" to the folder (and it's items inside it).
So I Created a "auto apply label" and selected this retention label "indefinite" to it. I am having trouble writing the CONDITION which actually looks for folder named "Finance". Can you help me with that?
I searched up various resources but can't find a single video or resource which explains how to write the above condition to apply a label when a folder name is matching a name mentiond in a query. Here is the auto label policy I am trying out
This is what some of the resources in web suggested, but I am not sure it works.
The above policy si active, but I can't see the auto label applied to the folder, or any document inside the Finance folder (See below). Is there a issue with the syntax?
VasilMichev
Nov 27, 2024MVP
Try the DocumentLink property as detailed here: https://learn.microsoft.com/en-us/purview/ediscovery-keyword-queries-and-search-conditions#searchable-site-properties
- vassp1980Nov 28, 2024Copper Contributor
Hi I have tried the Document Link property, it is not working. Here is screenshot from the Label Policy that I am trying to auto apply
Here is the condition
This auto label policy has been published 2 days ago (just that I fine tuned the condition as above, only today). But the Finance folder in the library, isn't getting the auto label ("Indefinite") applied yet
Neither are the files inside this folder getting auto labelled with "indefinite"
The goal is that "if the folder name is Finance, then auto apply the label named "indefinite" to this folder ( and the documents inside this folder). So What is it that I am doing wrong?
- VasilMichevNov 28, 2024MVP
Give it some time. Every time you modify a policy it needs to be republished to all workloads, this is not an immediate process. And after publishing, it takes some time to process items.
- vassp1980Nov 28, 2024Copper Contributor
thanks so much. I will wait and check.
But I hope the syntax of the condition is correct below? (If i access this link below, I am directly being taken to the Finance folder, so I know the URL is correct). But it would be great if you can just confirm if the syntax of the whole query as a whole, is correct.
documentlink:"https://psmodernworkplace.sharepoint.com/sites/VasModernWorkplaceTeamsSite/Working%20Documents/Finance"