I created a PowerApps booking system, which happily ran without issue until the number of bookings in my SharePoint List rose over 500 - that's when RemoveIf stopped working.
For now I'm sorted, I just archived some expired entries to get the number below 500. But that also means I can't test a workaround.
My question is, will it work if I have a filter inside my RemoveIf?
So where I have:
RemoveIf(Bookings, EventUID = Text(ThisItem.ID))
If I instead used:
RemoveIf(Filter(Bookings, BookeeEmail = _ThisUserEmail), EventUID = Text(ThisItem.ID)
Essentially just pre-filtering the datasource to the user's own bookings... that should work, right?
You can doublecheck the usage here, but what you've shown should work, assuming the Text() function isn't giving you delegation warnings, you close off your parentheses and the resulting filter doesn't exceed 500 rows...:)
RemoveIf(Filter(Bookings, BookeeEmail = _ThisUserEmail), EventUID = Text(ThisItem.ID))
I'm assuming that you could have more than one booking per EventUID, per user - which is why you're using the RemoveIf() function instead of Remove(), correct?
You know, I think this is the first time I've realised that's the difference between the two approaches!
In this case my users can only book once per event, so I should probably change it to a 'first' on a filter. The filter will definitely always pull back fewer than 500 records.
Actually, with a 1:1 relationship I'd suggest using a Remove() with a LookUp() - that way you're only ever targeting the exact record you need, instead of returning a table and then targeting with First() or Filter().
Remove(Bookings, LookUp(Bookings, EventUID = Text(ThisItem.ID)))
Hope this helps 🙂
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand