cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
davidstone
Level 8

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

 

davidstone
Level 8

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 RusselThomas
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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,263)