Power Apps Delegation Warnings – How to Overcome

While performing certain operations, such as filtering, searching, sorting, etc., we may encounter Delegation warning issues in Power Apps. This is just a warning from Power Apps if you use large data sets.

In this tutorial, I will explain how to fix or overcome the Power Apps delegation warnings with a few examples:

  • Power Apps Delegable Functions and Operations for SharePoint
  • Power Apps Delegation Warning On Filter Function
  • Power Apps Delegation Warning On Search Function
  • Power Apps Delegation Warning On Not Operator in Filter Function

Power Apps Delegation Warnings

In Power Apps, delegation plays a significant role in optimizing app performance and efficiency when working with large datasets.

It reduces the amount of data transferred over the network. However, not all operations can be delegated, and not all data sources are supported. Let’s look at some of the supported data sources.

Power Apps delegable data sources:

The following data sources are delegable for Power Apps.

Let’s look at some delegable functions, operators and columns of SharePoint data sources.

Power Apps Delegable Functions and Operations for SharePoint

Delegation refers to Power Apps ability to load and process data sources like SharePoint rather than fetching and processing all the data locally.

This is important for performance and efficiency, especially when dealing with large datasets.

Here are some delegable functions and operations for SharePoint in Power Apps:

Operations/FunctionsComparison Operators
FunctionsFilter, Sort, SortByColumns, Lookup, StartsWith
Logical OperatorsAnd(including &&), Or(including ||),
In (is delegable only for the columns in the same data source)
Comparision Operators=,>=,<=,>,<
SharePoint ID column only supports the = operator
  • Expressions that are joined with And or Or are delegated to SharePoint. Not isn’t delegable.
  • SharePoint system fields are not delegable. These fields include:
    • Identifier
    • IsFolder
    • Thumbnail
    • Link
    • Path
    • FilenameWithExtension
    • ContentType
    • IsCheckedOut
    • VersionNumber

Let’s see some examples of dealing with delegation warnings in Power Apps.

Power Apps Delegation Warning On Filter Function

In this section, we’ll see how to fix the delegation warning of the Filter() function in Power Apps galleries.

Here, I have the “Tracking Project Tasks” Power Apps gallery. At the same time, I’m using the Filter function to get the previous week’s tasks. I’m getting a delegation Warning. Look at the example below.

Power Apps Delegation Warnings

Power Apps provides a warning (yellow triangle) when you create a formula that contains something that can’t be delegated. Look at the warning below.

Delegation warning. The "WeekNum" part of this formula might not work currently on large data sets.

Fix this warning:

Formula : Filter('Tracking Project Tasks',WeekNum(EndDate) < WeekNum(Today()))

1. In the formula “WeekNum(EndDate) < WeekNum(Today())” triggers the delegation warning because the WeekNum function is partially delegated in SharePoint.

2. Functions like Filter and Sort are delegable to SharePoint but functions like WeekNum, Month, Year, and other date-related functions may not be fully delegable.

3. To solve this warning, fetch all the data from SharePoint and then use the WeekNum function locally in PowerApps.

4. To store all the fetching data from SharePoint locally, we must create Collections.

5. In the OnStart property of the app, provide the formula below.

ClearCollect(col_Project,'Tracking Project Tasks')

Here, ClearCollect() creates collections without duplicates. You can also use “Collect().” The col_Project is the collection name, and Tracking Project Tasks is the SharePoint data source.

powerapps remove delegation warning

6. The data is now stored in the collection. Use this collection instead of the SharePoint data source in the formula below.

Filter(col_Project,WeekNum(EndDate) < WeekNum(Today()))

Then, put the modified formula in the gallery’s Items property.

powerapps get rid of delegation warning

Look, no delegation warnings are showing now in the above example.

7. In the example below, you can see that I got previous tasks without delegation warnings.

powerapps delegation issues

Power Apps Delegation Warning On Search Function

Here, we’ll see how to solve the delegation warning of the Search() function in Power Apps galleries.

I have a SharePoint list called “Customer Contacts list.” Which is used in my PowerApps gallery.

powerapps delegation functions

When I use the Search function to get a particular user’s name, it shows a delegation warning, as below.

Delegation warning. The "Search" part of this formula might not work correctly on large data sets.
powerapps delegation example

Fix this Warning:

1. First, a delegation warning is not an error to stop displaying the data in PowerApps. We can still publish it, and users can see the data, but as a Power Apps maker, it’s our responsibility to solve warnings.

2. In delegation, the Search() function won’t support SharePoint data sources. Alternatively, we can use the StartsWith function in FIlter().

3. Change the previous formula to the below one in the Items property of the gallery.

Filter('Customer Contacts list',StartsWith(FirstName,"Mark")) 

Here, StartsWith() will return only those records where the ‘FirstName’ column starts with the text “Mark.”

powerapps delegation workaround

4. Look at the example below. The first name, which starts with “Mark,” was displayed in the gallery.

powerapps filter delegation workaround

Power Apps Delegation Warning On Not Operator in Filter Function

Let’s see how to solve the delegation warning of not operator[<>] in the Filter function of the Power Apps gallery.

I took a SharePoint list, “Project Tasks Details,” for the PowerApps gallery.

delegation warning in powerapps

While filtering the [Priority] choice field values with the Not operator, I’m getting a delegation warning like the one below.

Filter('Project Tasks Details',Priority.Value<>"Low")
Delegation warning. The highlighted part of this formula might not work correctly with column "Priority.Value" on large data sets.
powerapps delegation warning filter sharepoint list

Fix this Warning:

1. The <> operator is not delegatable in SharePoint. Alternatively, use Or logical operator.

Filter('Project Tasks Details',Or(Priority.Value ="High",Priority.Value="Medium"))

Here, the Or operator will return all the records from the list except the Priority column not having a “Low” value.

powerapps delegable operators for the SharePoint

2. Observe the example below, in which I kept the background color red. It displays the records only with the Priority column values “High” and “Medium.”

powerapps delegation warning in operator

Like this, you can use the alternatives for not-supported and partially-supported delegation functions and operators in Power Apps.

I hope you found this helpful article. Here, we have learned how to overcome Power Apps Delegation Warning and Power Apps delegable functions and operations for SharePoint.

You may also like the following related tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…