cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jltitus
Helper III
Helper III

Filter a collection when the field is a single line of text and/or the user()email

I'm working on a gallery where the data is coming from a SharePoint list (Elevate Application Dashboard). Given that my SP list has more than 2,000 rows of data I thought I'd create a collection with the information I need to then create the gallery from. 

 

If I create a collection from the SharePoint list so that it only lists those with a status of "Application" in the RoleValueApp field, I can cut my list down to 300 and I think successfully display in a gallery.

 

I've tried the following with double and single quotes around application to no success.

Collect(MySPCollection,Filter(ElevateApplication Dashboard,RoleValueApp = "Application")

 

ISSUE: How to generate the collection to only use the columns I need so the returned result is less than 2,000.

 

Here are the fields I want to include from the collection in my gallery:

Applicant - single line of text

RoleValueApp - single line of text

Location - single line of text

Manager - Person/Group

Manager ID - single line of text

Manager status - single line of text

RPLs - Multiple person/group

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

If the Filter you are using returns less than 2,000 records then there is no reason to use a collection.  Filter() is a delegable query so it will pass the query to SharePoint and return the appropriate records.  Just use the following in the Items property of the gallery

Filter("ElevateApplication Dashboard",RoleValueApp = "Application")


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

View solution in original post

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

If the Filter you are using returns less than 2,000 records then there is no reason to use a collection.  Filter() is a delegable query so it will pass the query to SharePoint and return the appropriate records.  Just use the following in the Items property of the gallery

Filter("ElevateApplication Dashboard",RoleValueApp = "Application")


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

Hi @Jltitus 

 

Editing my reply as @Pstork1  is correct here - avoid collections with delegation if you can.

@Jltitus 

Agreeing with @Pstork1 on the collection point...it will only slow down your app as it is going to try and collect ALL of the records, not just those that the app determines to be "on demand" (a whole other subject - but suffice to say, you would still see all of your data).

However, the formula mentioned should be:

Filter('ElevateApplication Dashboard', RoleValueApp = "Application")

Was just popping into this post to point out that it should be single quoted (the datasource that is).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
AmDev
Super User
Super User

Hi @Jltitus  - Thank you for marking my reply as a solution and I'm glad you got sorted.

 

@Pstork1's reply was before mine and he rightly flagged from the off the point that the expression is delegable, so I think he is more deserving of this solution. If possible, please can you reallocate the solution or if that isn't possible, please also mark @Pstork1's reply as a solution?

 

Many thanks and good luck with the rest of your build.

@AmDev thanks for the call out. I appreciate you letting me know. I think I've been able to change it so that @Pstork1 's reply is accepted as Solution.

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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