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!