cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nliu
Level: Powered On

Filter without using "In"

Hello,

 

I would to filter my gallery based on multiple choices of filter, it works well with the IN function but I'm using a SP List and I'll have more than 500 items.

 

How can I have the same result in a different way ? Many thanks !ScreenPowerApps.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter without using "In"

Hey!

 

If you have more than 500 records but less than 2000 records, then increasing the Data Row limit for Non-Delegable queries will work in your case.

1) Please check if your Data Row limit for Non-Delegable queries is set to 500,
Navigate to File -> App Settings -> Advanced Settings -> Look for Data Row limit for Non-Delegable queries
This can be set to the max value i.e. 2000 and works upto 2000 records out of all existing  using the Filter query. The soft limit is 500 which can be updated to 2000 records.
 
2) If you more than 2000 records and want to use a local collection then follow below steps:
a) Create an attribute in your SP list which holds the row count. This can be an auto increment field which auto populates itself when the record is added. (lets Name it "SNo")
b) create a collection to store the number of loop count:
ClearCollect(LoopCount,FirstN([0, 2000, 4000, 6000, 8000, 10000],RoundUp(First(Sort(<<YourSPList>>,SNo,Descending)).SNo/2000,0)));
c) Now work on the main collection to get all the data, this can be done through OnVisible property of the page.
Clear(ListItems);
ForAll(LoopCount,Collect(ListItems,Filter(BDDChantier,SNo> Value)));
d) Once all the data is inside the collection, filter out the gallery items based on the collection created using the same formula with IN, rather than referring to the data source directly.
 
Hope this Helps!
 
Thanks, 
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
1 REPLY 1
Super User
Super User

Re: Filter without using "In"

Hey!

 

If you have more than 500 records but less than 2000 records, then increasing the Data Row limit for Non-Delegable queries will work in your case.

1) Please check if your Data Row limit for Non-Delegable queries is set to 500,
Navigate to File -> App Settings -> Advanced Settings -> Look for Data Row limit for Non-Delegable queries
This can be set to the max value i.e. 2000 and works upto 2000 records out of all existing  using the Filter query. The soft limit is 500 which can be updated to 2000 records.
 
2) If you more than 2000 records and want to use a local collection then follow below steps:
a) Create an attribute in your SP list which holds the row count. This can be an auto increment field which auto populates itself when the record is added. (lets Name it "SNo")
b) create a collection to store the number of loop count:
ClearCollect(LoopCount,FirstN([0, 2000, 4000, 6000, 8000, 10000],RoundUp(First(Sort(<<YourSPList>>,SNo,Descending)).SNo/2000,0)));
c) Now work on the main collection to get all the data, this can be done through OnVisible property of the page.
Clear(ListItems);
ForAll(LoopCount,Collect(ListItems,Filter(BDDChantier,SNo> Value)));
d) Once all the data is inside the collection, filter out the gallery items based on the collection created using the same formula with IN, rather than referring to the data source directly.
 
Hope this Helps!
 
Thanks, 
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 355 members 5,379 guests
Please welcome our newest community members: