Hello Power App Wizards!!!
I have looked at a few posts here describing this problem, but nothing I have tried is working. As others have stated this was working fine until we reached the over 2k wall.
I have a Sharepoint list called ProjectTasks with over 7000 items.
I have a gallery:
I would like for my users to be able to Select the Trash Icon to delete an unnecessary task, essentially just deleting a line in that ProjectTasks list. A couple of things I've tried are:
OnSelect
RemoveIf(CH_ProjectTasks, ID=ThisItem.ID)
//RemoveIf(CH_ProjectTasks,ID=Gallery1.Selected.ID)
but so far nothing is working.
THANK YOU!
Hi Warren, Thank you for your contribution! I was re-collecting because I never even considered a "double-delete", it makes so much sense!
Hi @Anonymous ,
Firstly @RandyHayes is correct - it should delete and I do the same thing on a list with over 20k items.
I thought I would add a small contribution here though - why bother re-collecting - you just need to "double-delete" - from the list and also from the collection. I regularly "double patch" for the same reason when I have a gallery based on a collection for mobile device search performance.
Hi Randy,
Thank you so much for even responding! I'm pretty new to Power Apps and some days are definitely challenging.
I had someone else look at it, just to make sure that I'm not losing it, but it really wasn't working. After a lot of trial and error this is what we came up with and it seems to be working. (Note that I am using "Remove" instead of "RemoveIf") The collections are how I'm getting the gallery to refresh.
Remove(CH_ProjectTasks,ThisItem);
Concurrent(
ClearCollect(colTaskPage1, Filter(CH_ProjectTasks,IDCustom >=1 And IDCustom <2000)),
ClearCollect(colTaskPage2, Filter(CH_ProjectTasks,IDCustom >=2000 And IDCustom <4000)),
ClearCollect(colTaskPage3, Filter(CH_ProjectTasks,IDCustom >=4000 And IDCustom <6000)),
ClearCollect(colTaskPage4, Filter(CH_ProjectTasks,IDCustom >=6000 And IDCustom <8000))
);
ClearCollect(colTaskPageALL, colTaskPage1, colTaskPage2, colTaskPage3, colTaskPage4)
-Michele
@Anonymous
Hmmm, I just verified here.
I have a list with 3000 items. I have a Gallery that shows items beyond the record limit (record limit set to 5 in app - however Galleries ignore the record limit). That Gallery is showing a record that is at ID 2987 (for example) and there is a trashcan icon with the formula RemoveIf(BigList, ID=ThisItem.ID) When it is clicked, record number 2987 is deleted from the SharePoint list. No problem.
Not sure if this one is related, but make sure your Formula-Level Error Management feature is turned on in the app.
Hi Randy,
I thought the same thing, but I have checked/refreshed the SharePoint list multiple times and the task is still there. The crazy thing is that I can see that PA is thinking about something after selecting the trash can, but no change.
-Michele
@Anonymous
Your RemoveIf function based on the ID will work. You need to rely on the primary key to identify a record beyond the record limit and it will work fine.
Since your gallery is based on a collection - your gallery is not going to update when you delete a record because the collection is a static snapshot. If you look in your SharePoint list after you initiate the RemoveIf(CH_ProjectTasks, ID=ThisItem.ID), that item should be gone at that point.
I hope this is helpful for you.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473