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
Microsoft
Microsoft

Re: Workaround for RemoveIf not being delegable?

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

 

Highlighted
davidstone Kudo Kingpin
Kudo Kingpin

Re: Workaround for RemoveIf not being delegable?

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!

Microsoft
Microsoft

Re: Workaround for RemoveIf not being delegable?

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,953)