I am looking at creating a flow that once a month will delete items from my SharePoint list that are more then a year (I have a date out column that I want to use to determine the date)
Any help I can get would greatly be appreciated.
I am looking at creating a flow that once a month will delete items from my SharePoint list that are more then a year (I have a date out column that I want to use to determine the date)
Any help I can get would greatly be appreciated.
Thank you very much
Yes... addDays(utcNow(),-365,'yyyy-MM-dd') this worked for me.
Thank you for you help. It still did work for me but using your suggestions I was able to come up with something that did work for my.
I found this worked for me.
Odd that it did not work. I just set up two workflows today with this type of filter and they worked without any issues. Is it generating an error message? If so, what is the error? In this flow I want everything where the status is active and it was created within the past seven days:
This is the expression for the date field:
addDays(utcNow(),-7,'yyyy-MM-dd')
Note, it is important that the expression is within single quotes and the date is formatted as an ISO8601 date, which is the format shown in my expression. Any other date format will not work.
Thanks for your help but this did not work, I am working with a list and I did change to get items and delete items. When I tried adding the condition it told me it did not work (I changed Get_files_(properties_only to Get-Items but it still did not work)
In that case, using Power Automate is not too difficult. You would:
Your flow will look like this. If you need to do this on a list, use Get items and Delete item.
Note: you will probably want to add a condition in the apply to each to make sure IsFolder equals False and then put the delete action in the Yes side so it only deletes the item if it is not a folder.
Thanks for the suggestion, unfortunately I don't have access to these setting.
Since you already have a date field that you would like this to occur on, I would suggest that you use the built-in information management policies feature to delete the item based on that date field. You can read more about this feature and how to configure it at Create and apply information management policies - Microsoft Support
It will look like this:
Of course you do not need to use the declare record feature, which prevents the item from being deleted. And there is an option to Permanently Delete in addition to the Move to Recycle Bin option.
WarrenBelz
146,668
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional