cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidstone
Kudo Kingpin
Kudo Kingpin

Workaround for RemoveIf not being delegable?

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?

3 REPLIES 3
RusselThomas
Microsoft
Microsoft

Hi davidstone,

 

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?

 

Kind regards,


RT

 

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.

 

Thanks!

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 🙂

 

Kind regards,


RT

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,435)