web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Avoid Delegation in it...
Power Apps
Suggested Answer

Avoid Delegation in items prop of a table in canvas app

(0) ShareShare
ReportReport
Posted on by 200
Hello, 

I am working with canvas app, I put the code below in items prop of a table,  and I am having delegation issue with || and in ( highlighted in Yellow ). 

Who has a suggestion of another way to do it and avoid delegation warning ! 
 
Delegation error : Delegation warning. The "Filter" part of this formula might not work correctly on large data sets.
 
    Sort(
        Filter(
            TimeEntries,
 
            // Manager filter
            (IsEmpty(ManagerListFilter_MyTS.SelectedItems) || IsBlank(ManagerListFilter_MyTS.SelectedItems))
                || ManagerName in ManagerListFilter_MyTS.SelectedItems.Title,
           
            // Week filter
            (IsEmpty(WeeksListFilter_MyTS.SelectedItems) || IsBlank(WeeksListFilter_MyTS.SelectedItems))
                || Title = WeeksListFilter_MyTS.Selected.Week,
           
            // Month filter
            IsBlank(ListMonthFilter_MyTS.Selected) || Month = ListMonthFilter_MyTS.Selected.MonthName,
 
            // Project filter
            (IsEmpty(ProjectsListFilter_MyTS.SelectedItems) || IsBlank(ProjectsListFilter_MyTS.SelectedItems))
                || ProjectName = ProjectsListFilter_MyTS.Selected.Value,
 
            // WBS filter
            (IsEmpty(WbsListFilter_MyTS.SelectedItems) || IsBlank(WbsListFilter_MyTS.SelectedItems))
                || WBS = WbsListFilter_MyTS.Selected.WBS
        ),
        Modified,
        SortOrder.Descending
    )

 
Categories:
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,267 Moderator on at
     
    You’re hitting delegation issues mainly because of:
    in operator (not delegable for most data sources)
    Combining conditions with || (OR logic breaks delegation)

    To stay delegable:
    • Use simple comparisons (=)
    • Avoid using in operator
    • Avoid complex OR conditions inside Filter
    Instead of putting everything in one Filter, build it step by step:

    With(
        {
            src: TimeEntries
        },
        Sort(
            Filter(
                src,
                (IsEmpty(ManagerListFilter_MyTS.SelectedItems) || ManagerName = ManagerListFilter_MyTS.Selected.Title),
                (IsEmpty(WeeksListFilter_MyTS.SelectedItems) || Title = WeeksListFilter_MyTS.Selected.Week),
                (IsBlank(ListMonthFilter_MyTS.Selected) || Month = ListMonthFilter_MyTS.Selected.MonthName),
                (IsEmpty(ProjectsListFilter_MyTS.SelectedItems) || ProjectName = ProjectsListFilter_MyTS.Selected.Value),
                (IsEmpty(WbsListFilter_MyTS.SelectedItems) || WBS = WbsListFilter_MyTS.Selected.WBS)
            ),
            Modified,
            Descending
        )
    )
    Important Limitation
    If you need multi-select filtering, there is no fully delegable way with in.
     
    Options:
    Limit to single selection (fully delegable)
    Or accept partial delegation warning
    Or pre-filter in a collection (for smaller datasets)

    Summary
    Problem is caused by in + ||
    Use simple = filters instead
    Multi-select filters = not fully delegable
     
    ✅ If one of the responses here solved your issue, please mark it as Accepted so others facing the same problem can benefit as well.
    👍 If this or any other reply here helped you, feel free to give it a Like. It helps others and is always appreciated.

    Sunil Kumar Pashikanti, Moderator
    Blog: https://sunilpashikanti.com/posts/
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,368 Super User 2026 Season 1 on at
     
    In Power Apps Canvas Apps only certain functions are delegable. If we use just one nondelegable function in our query, then the whole query won't be delegable. So, it is very important that we compose our query by carefully choosing delegable functions.
     
    Delegable datasources are SharePoint, Microsoft Dataverse,,SQL Server

    The above datasources are delegable. In case we work with the above datasources, we might need to face delegation.
     
    As we know, Excel workbooks, collections, and tables are stored in Power Apps Canvas App, so for searching and filtering, we can use whatever function we wish to and the application does not require delegation.
     
    Delegable functions are,
    • And (including &&), Or (including ||), Not (including !)
    • In
    • =, <>, >=, <=, >, <
    • +, –
    • TrimEnds
    • IsBlank
    • StartsWith, EndsWith (these are very important functions, I use them very often)
    • Constant values that are the same across all records, such as control properties and global and context variables.
    Starts With
     
    The function of the chosen field cannot be delegated. The person field is utilized with the StartsWith function. We must understand when these functions can be utilized because the StartsWith function also operates with single-line text fields and number fields.
     
    Therefore, it is best to construct, say, a single line of text field adjacent to a choice field and update it in the same way that we would edit a choice field if we want to filter the field. The name of this field would be the [TECHNICAL] field, and its sole purpose would be filtering.
     
     
    With(
        {
            _mgr: ManagerListFilter_MyTS.SelectedItems,
            _week: WeeksListFilter_MyTS.Selected,
            _month: ListMonthFilter_MyTS.Selected,
            _proj: ProjectsListFilter_MyTS.Selected,
            _wbs: WbsListFilter_MyTS.Selected
        },
        Sort(
            Filter(
                TimeEntries,
     
                // Manager (single selection recommended for delegation)
                IsEmpty(_mgr) || ManagerName = First(_mgr).Title,
     
                // Week
                IsBlank(_week) || Title = _week.Week,
     
                // Month
                IsBlank(_month) || Month = _month.MonthName,
     
                // Project
                IsBlank(_proj) || ProjectName = _proj.Value,
     
                // WBS
                IsBlank(_wbs) || WBS = _wbs.WBS
            ),
            Modified,
            SortOrder.Descending
        )
    )
     
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Suggested answer
    11manish Profile Picture
    3,180 on at
    The biggest delegation offender is:
     
    ManagerName in ManagerListFilter_MyTS.SelectedItems.Title
     
    If your data source contains more than 2,000 records and delegation is critical:
    • Convert filter controls to single-select where possible.
    • Use only delegable operators (=, StartsWith, comparison operators).
    • Avoid in against SelectedItems.
    • If multi-select filtering is a hard requirement, consider moving the data to Dataverse or SQL and implementing server-side filtering, or accept that the filter will be processed locally.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard