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 / DELEGATION ISSUES - SU...
Power Apps
Answered

DELEGATION ISSUES - SURVEY APP WITH MULTIPLE FILTERS/SORTING OPTIONS

(0) ShareShare
ReportReport
Posted on by 49

Hello!  I have a survey app, which filters data from a SharePoint List and is being Filtered by Dropdowns, Search and Sorting by Columns when sort arrows are clicked.  the list has over 3000 records and even though it isnt showing any delegation warnings, I'm still running into an issue when I turn the Row Limit down to 1 (for testing delegation purposes).  I've included the code below.  Would appreciate your expertise on this one 🙂  Thanks so much!

 

 

SortByColumns(If(
IsBlank(EndDatePicker_5.Value),
If(
IsBlank(StartDatePicker_5),
'EVALUATION LIVE DATASOURCE',
Filter(
'EVALUATION LIVE DATASOURCE',
'Completion time' >= StartDatePicker_5.Value
)
),
If(
IsBlank(StartDatePicker_5),
Filter(
'EVALUATION LIVE DATASOURCE',
'Completion time' <= EndDatePicker_5.Value
),
Filter(
'EVALUATION LIVE DATASOURCE',
'Completion time' <= EndDatePicker_5.Value,
'Completion time' >= StartDatePicker_5.Value,'INSTRUCTOR RATING'.Selected.Value="Instructor Rating: Show All" Or 'TRAINER NPS'='INSTRUCTOR RATING'.Selected.Value,'OVERALL RATING_1'.Selected.Value="Content Rating: Show All" Or 'NPS OVERALL '='OVERALL RATING_1'.Selected.Value,MANAGER='MANAGER SELECTION_1'.Selected.Value,StartsWith('Enter Name of Class',Searchbox_2.Text) Or StartsWith('Enter Class Start Date',Searchbox_2.Text) Or StartsWith('Please select Trainer',Searchbox_2.Text)))),SortColumn,If(SortDescending,Ascending,Descending))

 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,563 Super User 2026 Season 1 on at

    Hi @TONYSTORM ,

     

    Can you please share a screenshot to show what parts of the code give the delegation warning instead of us having to guess?

  • TONYSTORM Profile Picture
    49 on at

    Sure!  The formula isn't showing delegation errors.  However, it's still running into a delegation issue.  

    Capture.PNG

  • TONYSTORM Profile Picture
    49 on at

    Any help on this one would be appreciated.  Thanks! 🙂

  • BCBuizer Profile Picture
    22,563 Super User 2026 Season 1 on at

    Hi @TONYSTORM ,

     

    Can you please confirm you are using SharePoint as a data source and what are the data types for the MANAGER and SortColumn?

     

    In case MANAGER is Person/Group type, the issue may be there since only the Email and DisplayName are delegable.

     

    SortByColumns is not delegable for complex datatypes, so that is another possible cause.

     

    https://docs.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint

  • TONYSTORM Profile Picture
    49 on at

    Hello,

     

    Yes, I'm using SharePoint as the datasource. The MANAGER Column is a text field in SharePoint.  SORTCOLUMN is a variable attached to the Sort arrow icon( code below)

    UpdateContext({SortColumn:"TRAINER_NAME",SortDescending:!SortDescending});Set(varSortDirection,If(varSortDirection=Ascending,Descending,Ascending))
  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @TONYSTORM ,

    Firstly, I have parsed and restructured this (you might try Format Text - it helps enormously), so it is more readable. From what I can see without knowing your data, this should be Delegable

    SortByColumns(
     Filter(
     EVALUATION LIVE DATASOURCE',
     (
     IsBlank(EndDatePicker_5.SelectedDate ||
     'Completion time' <= EndDatePicker_5.SelectedDate
     ) &&
     (
     IsBlank(StartDatePicker_5.SelectedDate) ||
     'Completion time' >= StartDatePicker_5.SeletedDate
     ) &&
     (
     'INSTRUCTOR RATING'.Selected.Value = "Instructor Rating: Show All" ||
     'TRAINER NPS' = 'INSTRUCTOR RATING'.Selected.Value
     ) &&
     (
     'OVERALL RATING_1'.Selected.Value="Content Rating: Show All" ||
     'NPS OVERALL ' = 'OVERALL RATING_1'.Selected.Value
     ) &&
     MANAGER = 'MANAGER SELECTION_1'.Selected.Value &&
     (
     StartsWith(
     'Enter Name of Class',
     Searchbox_2.Text
     ) ||
     StartsWith(
     'Enter Class Start Date',
     Searchbox_2.Text
     ) ||
     StartsWith(
     'Please select Trainer',
     Searchbox_2.Text
     )
     )
     ),
     SortColumn,
     If(
     SortDescending,
     Ascending,
     Descending
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • TONYSTORM Profile Picture
    49 on at

    Hi,  

     

    Thank you!  The formula seems to work, however I'm getting a Delegation warning on the SORTCOLUMN part.  

    TONYSTORM_0-1658156911303.png

     

  • Verified answer
    WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @TONYSTORM ,

    Yes - I forgot about that one - you cannot have a Variable in there to be Delegable - it needs to be a specific column name. You could to this, but the top filter output (the list size does not matter) needs to be under your Delegation limit

    With(
     { 
     wList:
     Filter(
     EVALUATION LIVE DATASOURCE',
     (
     IsBlank(EndDatePicker_5.SelectedDate ||
     'Completion time' <= EndDatePicker_5.SelectedDate
     ) &&
     (
     IsBlank(StartDatePicker_5.SelectedDate) ||
     'Completion time' >= StartDatePicker_5.SeletedDate
     ) &&
     (
     'INSTRUCTOR RATING'.Selected.Value = "Instructor Rating: Show All" ||
     'TRAINER NPS' = 'INSTRUCTOR RATING'.Selected.Value
     ) &&
     (
     'OVERALL RATING_1'.Selected.Value="Content Rating: Show All" ||
     'NPS OVERALL ' = 'OVERALL RATING_1'.Selected.Value
     ) &&
     MANAGER = 'MANAGER SELECTION_1'.Selected.Value &&
     (
     StartsWith(
     'Enter Name of Class',
     Searchbox_2.Text
     ) ||
     StartsWith(
     'Enter Class Start Date',
     Searchbox_2.Text
     ) ||
     StartsWith(
     'Please select Trainer',
     Searchbox_2.Text
     )
     )
     )
     },
     SortByColumns(
     wList:
     SortColumn,
     If(
     SortDescending,
     Ascending,
     Descending
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @TONYSTORM ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • TONYSTORM Profile Picture
    49 on at

    It worked!  Thanks so much 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard