How to Apply filter, Search and SortByColumn directly in Browse Gallery without a delegation warning in Power apps(data source: SharePoint list).
This post is to help you, how to get rid of delegation warnings in the
Browse Gallery while filtering out the items from a SharePoint list without
using any collection.
There are multiple ways to overcome the
5000 records limit in power apps(will cover them in coming posts).
Script:
use the below script in the Items action of Browse Gallery.
SortByColumns( Filter( [@Test],Department="HR" Or Department="IT",
StartsWith( Title, TextSearchBox1.Text ) ), "Title", If( SortDescending1,
Descending, Ascending ) )
For reference:
Dry Run:
-
The SortByColumns () function is to sort records
alphabetically.
-
Filter() this function is to retrieve only required items from an SP
list.
e.g. employees belong to IT or HR.
-
After retrieving the required data, we are using the StartsWith() to
Search records.
Use case Or Where I used it?
I'm working on a requirement, where I have a list with 5000+ records and in the power app, there is a limit of 2000 items at a time or we can fetch 2000 items in a single request.
There are multiple ways to deal with this scenario but for me, the quick hack was this, where I directly used the filter on columns and filtered out the required data without any delegation warning.
Hope this could help you, give it a try!
Thank you!
FYI, will cover in the coming posts - the best ways to retrieve more than 5000 records from a SharePoint list.
I'm working on a requirement, where I have a list with 5000+ records and in the power app, there is a limit of 2000 items at a time or we can fetch 2000 items in a single request.
There are multiple ways to deal with this scenario but for me, the quick hack was this, where I directly used the filter on columns and filtered out the required data without any delegation warning.
Hope this could help you, give it a try!
Thank you!
FYI, will cover in the coming posts - the best ways to retrieve more than 5000 records from a SharePoint list.
Comments
Post a Comment