Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Can I Hide this Warning on Data Set?

There is a yellow triangle on my Gallery object, with the tooltip: "Delegation warning. This part "SortByColumns" of this forumla might not work correctly on large data sets...."


I'm using this data source for a gallery data set:


SortByColumns(Filter('[dbo].[Schedules]', Deleted=false), PrimarySortColumn, PrimarySortDirection)


Sort column and direction are set interactively by manipulating the variables PrimarySortColumn and PrimarySortDirection.  It seems to work fine.  There is no warning if I hardcode the column name and the sort direction.  Is this really something to be concerned about?  IsPowerApps really smart enough to know what I'm doing here?

Community Support
Community Support

Hi @sotomo,


The Column used within the SortByColumn would be quoted in double quotes, which is a little different from that in the filter function.

I personally think using Variable may have some effects on that.


You may take a look at the SortByColumns() document as a reference:

Sort and SortByColumns functions in PowerApps


By the way, could you please share more details about the PrimarySortColumn variable, how it is generated?




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PrimarySortColumn is Set when one of the sort buttons is clicked.  It can be set to either "Name", "Date", "Description", or whatever the name of the column is.  It makes it easy to sort by multiple columns.


At the same time, the PrimarySortDirection variable is also set to either Ascending or Descending, alternating between the two, every time a sort button is clicked.


For example, these are the OnSelect actions on three of the sort buttons.  It seems to work fine:


The Name sort button:




The Description sort button:




The Date sort button:





And again, this is this is how Items is set on the Gallery object:


SortByColumns(Filter('[dbo].[Process]', Deleted=false), PrimarySortColumn, PrimarySortDirection)

Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,700)