PowerApps SharePoint list limitations
In this article, we will discuss PowerApps delegation, delegable data sources, and functions, and how to overcome the delegation warning in PowerApps? Show What is PowerApps Delegation?Delegation is a very important concept that you have to understand, especially when you will be working with large data sets in PowerApps. First, let’s know that “delegate” means to assign tasks to someone else. PowerApps Delegation means when you work with different data sources such as DataVerse, SharePoint, SQL Server, etc, the data processing is assigned to the data sources rather than done by PowerApps itself. This means Power Apps will retrieve a small amount of data, and this will speed up the app and improve the user experience. PowerApps Delegation limitThe default delegation limit in PowerApps is 500 records. Delegation does not apply to data sets with less than 500 records, they will work correctly without any issue. Also you can increase this limit to be up to 2000 records.
But if your data sets exceed the limit defined in your app, it will work correctly with the first 500 records. “Assume that the defined limit is 500.” but it will not work correctly with other records. If you have 600 records in your data set and you want to retrieve the last 10 records, in this case, it will return the records from 490 to 500 instead of returning the correct records from 590 to 600. So it’s important to understand the delegation if you want your app to work correctly. PowerApps Delegable data sourcesAs we know, there are many data sources that are supported to work with PowerApps, but not all of them are delegable. You will find a few data sources that support delegation in PowerApps. These data sources support the delegation process of the data, similar to what PowerApps do. Some of the most popular delegable data sources are:
Unfortunately, the Excel data source is not delegable, but it depends on whether your excel file is stored in the cloud or stored locally in the app.
When performing operations, like filtering or searching for specific records in PowerApps, they are performed at the data source instead of bringing the whole set of data to the app and then processing it locally, so PowerApps delegation assigns the work to the data source instead of the PowerApps itself. Although you use delegable data sources, you get a delegation warning, That’s because the delegation not only depends on the data sources but also depends on the functions that you use in your formulas. Delegable FunctionsAs there are delegable and non-delegable data sources, there are delegable and non-delegable functions. For Example, Filter, Search, LookUp, Sort, SortByColumns, Sum, Average, Min, and Max functions can be delegated. AddColumns, DropColumns, RenameColumns, and ShowColumns partially support delegation. For more details, you can check Understand delegation in a canvas app. How to overcome the PowerApps delegation warning?You will receive a delegation warning if you use a function that is not yet supported by the data source. You will see a blue line under some parts of the code, along with a warning triangle. To Avoid the delegation warning,
Overcome delegation when using Search & inSearch & in are non-delegable One common alternative is StartsWith (which is Delegable), One “trick” with StartsWith is to make the Default of the text box where the user enters the text “”(empty string), so records would start to filter as soon as the user started typing in the box. Filter( MyList, StartsWith( FieldName, TextBoxName.text ) )
Overcome delegation when using IsBlankIsBlank is non-delegable so the bellow formula will give delegation warning Use Blank() to overcome the delegation Filter( MyList, FieldName = Blank() )Create Power Apps Collections Over 2000 items.Getting more than 2000 records into our apps from a single data source has always been one of the most frequently asked questions by PowerApp developers. In this case, we will deal with a collection that is created from a SharePoint list data source. As we know, the SharePoint list doesn’t exceed 4000 items, so how to create a Power Apps Collection? Over 2000 items, exactly the 4000 items? Answer
Collect Data In sets with For All LoopsA ForAll function can be used to collect several sets of rows from a data source that match a list of supplied values. The only limitation is each individual set cannot exceed 2,000 rows. but the total size of the collection can exceed 2,000 rows. ConclusionTo avoid the delegation warning in PowerApps, try wisely to use your data source, You can use SQL Server, Dataverse, or SharePoint, and you can increase the rows of your data by increasing the value above 500 records. See Also |