Hi there,
I would like to create a flow that runs through all Sharepoint lists on my Sharepoint subsite and deletes items that are older than X years. Does anyone know if you can create a flow that checks each list without having to add that list manually to the flow? There will be lists added to this site and they all need to be in the scope of the flow, with as little manual updating necessary as possible 🙂
Thanks in advance!
Merel
Solved! Go to Solution.
Hi @Merel ,
It seems you want to get all the lists in your SharePoint subsite.
Then checking each item whether they older than X years.
I suggest you use the 'Get lists' action of SP.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Merel ,
You should use the expression to get the 'Created' here:
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Theoretically this should be something that you can accomplish, althought it isn't possible with the built-in SharePoint connectors. Currently, you must explicitly name the SharePoint list you want to update with the SharePoint Connectors, but if you'd like multiple list selection as a default functionality, you may submit a request here.
You could likely do this with custom functions and logical expressions in Flow, utilizing the SharePoint REST API, but as I stated, it would be quite complex. The SharePoint REST web service works great with Microsoft Flow, and allows you to do pretty much anything you want with SharePoint data, you just have to build it.
For more information about the REST service and Flow, please see the following links:
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. THANKS!
Hi @Merel ,
It seems you want to get all the lists in your SharePoint subsite.
Then checking each item whether they older than X years.
I suggest you use the 'Get lists' action of SP.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Brad_Groux and @v-zhos-msft ,
Thank you both very much for your suggestions! I have been playing around with @v-zhos-msft 's suggestion and I hope this will lead me to the final solution. The problem that I encouter is that I cannot seem to load the 'Created' column of the lists in order to be able to filter on items older than X years. See below for my flow.
Do you have any suggestions on how to deal with this? Thanks again in advance!
Hi @Merel ,
You should use the expression to get the 'Created' here:
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
61 | |
52 | |
48 | |
28 | |
18 |
User | Count |
---|---|
26 | |
26 | |
24 | |
22 | |
21 |