I need help with building a Power Automate flow based on values set in couple of columns.
I have a SharePoint Document Library called "Working Documents" as below. It has 2 key columns based on which I want to build the flow. They are "Retention label" and "Retention elapse date".
My idea of the flow is that it should trigger when a value is selected for "Retention label" column for any folder in this library. Then need a condition (or maybe a switch statement) based on retention label column. Lets say if value for the "REtention label" is test-3 years, then update "retention elapse date" column with 3 years from now. Similarly if value in retention label is test-5 years, then set the elapse date value to 5 years from the label applied date
I have started building the flow but having trouble even getting the flow to trigger. The flow should fire only when I populate the "Retention label" column for a folder with a value, and then the other actions follow. Here is the flow trigger & the trigger condition I set
Trigger condition is below
Note : I found that the actual name of the "Retention label" column seems to be "Compliance tag" as per the url (as per screenshot below). I just sorted this column by desdending, so the URL was looking like the below. Hence I assume that this is the actual name of the column which I should be using in the flow trigger
But this flow doesn't even trigger (let alone building the rest of the flow conditions for retention label values).
Can you please help me build this flow with following requirements :
-Flow to trigger when any folder has the "retention label" Column populated with a retention label value
-Then depending on the value selected in this retention label column (I assume its called ComplianceTag), the flow should have different branches that set a value in the "Retention elapse date" Column (Ie, if label is 3 years, set the elapse date value to 3 years from now etc)
As far as I am aware that specific trigger action doesn't return the _ComplianceTag property in the body. So, you would need an additional action in your setup to check this.
But you might be able to solve this with a calculated column or some column formatting as well. Just use the value of the Retention Label Applied column and calculate the new elapse date based on the retention label selected.
I can share an example if you are interested in that approach?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.