I have a sharepoint list where I only want to maintain 10 records always, so at the 11th record, those items 1 to 10 will be automatically deleted, and at the 21st record, all those entries from record 11 to 20 will be deleted. Appreciate the help to create a flow for this.
Thanks!
Solved! Go to Solution.
In your screenshot your filter query is showing just a value of 25.
You need to have a column than value, like in my example.
Furthermore, my example only allows 10 items to be available at a time.
Did you want there to be only IDs based on the IDs + 10?
Like IDs 1-10, 11,21, 22,32
Proud to be a Flownaut!
Hello @CatPagulayan
Please take a look at this:
Proud to be a Flownaut!
hi @Jcook , thanks for your help but I tried and followed the flow but seems it gets an error from the get items part. I am not sure if flow is able to know how many entries I have entered and is basing only from the ID. I've had some tests already and deleted them so the starting ID of my list is at 21. I tried doing in 3s first so I am expecting it is deleting the first 3 I have entered (I have entered 5 items now and seems nothing is getting deleted. The ID in sharepoint though starts at 21 (so i have IDs 21 to 25), my expectation is that it will delete items from ID 21 to 23). Appreciate your help 🙂
In your screenshot your filter query is showing just a value of 25.
You need to have a column than value, like in my example.
Furthermore, my example only allows 10 items to be available at a time.
Did you want there to be only IDs based on the IDs + 10?
Like IDs 1-10, 11,21, 22,32
Proud to be a Flownaut!
Hello @Jcook , so this is my sharepoint list sample:
for that example, I only want to retain say 3 items to make it simpler. so the first 6 items (say from ID 21 to 26) should be deleted. Then when I enter another entry after ID 29 - so that will be ID 30, entry/row under ID 27 will be deleted so that what remains are entries under ID 28, 29, 30 and so on. so the maximum entries in the sharepoint in this case should be 3 most recent items only. Is that possible? thanks in advance!
Yes, follow my example above and change the value in the condition from 10 to 4
This value is not the ID it is the Length of items. Please try and re create the flow I have shown. It does exactly as you describe.
Proud to be a Flownaut!
You are correct @Jcook ! It worked like a charm! 🙂 thanks very much for your help in this!!
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
28 | |
26 | |
24 | |
23 | |
14 |