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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SortByColumns of Datav...
Power Apps
Unanswered

SortByColumns of Dataverse source inconsistently Delegable

(0) ShareShare
ReportReport
Posted on by 427

I have 2 different Galleries looking at 2 different Dataverse Tables, and using a SortByColumns in each formula.

 

I am actually using a Lookup Formula to state the "sort column" (I know the documentation says it should be a text literal, but the documentation is wrong - a formula works fine, as long as the formula returns a string).

 

For one Dataverse Table (Companies), I am NOT getting a delegation warning.

But for the other Dataverse table (Quotes), I AM getting a delegation warning.

 

The Companies Table is heavily filtered with quite a large formula, but the Quotes filter is pretty simple.

 

Is the PowerApps studio engine simply not stating the delgation warnings correctly?

Perhaps when the filter is a complicated function, it bypasses the delgation warning checks?

 

My conundrum is - Can I trust the Delegation warnings?

Am I going to get partial datasets of Companies without knowing it?

 

I have included my code snippets below:

Companies Gallery Items:

SortByColumns(
 Filter(
 If(IsBlank(Txt_CustomerSearch.Text),
 
 If(Choice_My_All.Selected="MY Customers",
 Filter(Companies,
 'UK Sales Rep'.'Full Name'=str_UserName 
 && ('Company Type'=str_SelectedFilter_CompanyType || str_SelectedFilter_CompanyType="ALL")
 && ('Country / Region' in Combo_Filter_Country.SelectedItems.sdx_option || IsBlank(Combo_Filter_Country.Selected.sdx_option))
 ),
 Filter(Companies,
 ('Company Type'=str_SelectedFilter_CompanyType || str_SelectedFilter_CompanyType="ALL")
 && ('Country / Region' in Combo_Filter_Country.SelectedItems.sdx_option || IsBlank(Combo_Filter_Country.Selected.sdx_option))
 )
 ),
 Search(Companies,
 Txt_CustomerSearch.Text,
 "sdx_name","sdx_aka","sdx_customerreference","sdx_contacttelephone"
 )
 ),IsBlank('Parent Company')),
 Coalesce(LookUp(col_ColumnReference_Companies,DisplayName=Gallery_Customers_Headers.Selected,LogicalName),"sdx_name"),
 If(Gallery_Customers_Headers.Reverse,Descending,Ascending)
)

 

Quotes Gallery Items:

SortByColumns(
 Quotes,
 LookUp(col_ColumnReference_Activities,DisplayName=Gallery_SimpleQuote_Headers.Selected,LogicalName),
 If(Gallery_SimpleQuote_Headers.Reverse,Descending,Ascending)
)

 (Delegation Warning on the "LookUp" formula for the sort column)

 

James.

I have the same question (0)
  • james_hathaway Profile Picture
    427 on at

    So - Things are even more interesting than I thought...

    ... I ran the App in a Monitor session (with "Debug Published App" turned on), and things are even more Curious!

     

    In the App Monitor - I get a Delegation Warning (and a warning that only 2000 records were scanned) for the Companies query, but NOT the quotes query! (And there are over 10,000 records in each table)

     

    So -

    Companies Table Query - PowerApps Studio does NOT give a delegation warning, but the monitor DOES.

    Quotes Table Query - PowerApps Studio says Delegation Warning, but Monitor does NOT

     

    I'm inclined to believe the Monitor over the PowerApps Studio

     

    There's a Lesson here:

    DO NOT TRUST THE POWERAPPS STUDIO TO GIVE YOU A DELEGATION WARNING.

    IT LIES!

     

    James.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard