cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DTooley
Advocate III
Advocate III

Filter a list using the 'in' operand

I need to filter a SharePoint list of over 2000 items.  So, delegating to SP to the filtering and return data is out. 

 

The field to be filtered is a multi-line text field containing multiple email addresses and is called Owners Group.  When a user accesses the app, I'd like to filter the items so that every item containing the users email address in Owners Group is displayed in a gallery.  Basically, I'd like it to function as [Me].

 

In APP Onstart, I tried this: Set(varUser, User()); Set(vargroup, 'Owners Group')

Then in Gallery Items property: Filter(varUser.Email in vargroup)   I thought I could build a collection in the app and filter it for 'contains' using 'in'.

 

I have watched numerous videos but all use = as the operand. No one discusses 'in'.  I have also read numerous articles, but none say I can't do this some how nor do they show how you can.

 

Maybe this can't be done.  If so, I can live with that.  I would just like to know how or that I can't.

 

Thanks,

Dave

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

'in' is not a delegable operator for SharePoint.  It will work in some data sources, but it won't work in SharePoint for large numbers of records.  Your only real workaround is to pre-filter the list on something else to get it below the data row limit (max 2,000) and then apply your IN to an outer filter.  At that point you can ignore the fact that its not delegable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
WarrenBelz
Super User
Super User

Hi @DTooley ,

The in operator is not delegable, so using on the entire list will simply not work. I have done a blog on using the With() filter on non-delegable queries - it may be useful if you have another Delegable filter you can reduce the data set with.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,522)