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 / Issue sorting an huge ...
Power Apps
Unanswered

Issue sorting an huge sharepoint list (more than 20000 record)

(0) ShareShare
ReportReport
Posted on by 6

I have a BrowseGallery connected to a Sharepoint List of 25000 rows, if I try to do a Sort or a SortByColumns on a single column of my List I have no problems, but if I try to insert another Sort or another column in the SortByColumns my list returns no data.


Can you tell me if there is a record limit that prevents me from sorting based on 2 columns?


I temporarily solved my issue by concatenating the 2 columns.
This is the content of my BrowseGallery Items :

Sort(
Filter(
[MySP_List];
ACCOUNT = User().Email;
StartsWith(
Column1;
TextSearchBox1.Text
) || StartsWith(
Column2;
TextSearchBox1.Text
) || StartsWith(
Column3;
TextSearchBox1.Text
) || StartsWith(
Column4;
TextSearchBox1.Text
)
);
Column_order1 & Column_order2;
If(
SortDescending1;
Descending;
Ascending
)
)

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @babaciu75 

    SortByColumns is not delegatable if you use a variable to sort on.   The problem is SortDescending1.  If you can live with just sorting your columns Ascending, I think you will avoid the issue.

  • babaciu75 Profile Picture
    6 on at

    I already did, but the problem persists

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @babaciu75 

    Try

    Sort(
     Sort(
     Filter([MySP_List];
     ACCOUNT = User().Email;
     StartsWith(Column1;TextSearchBox1.Text) ||
     StartsWith(Column2;TextSearchBox1.Text) || 
     StartsWith(Column3;TextSearchBox1.Text) || 
     StartsWith(Column4;TextSearchBox1.Text)
     ); Column_order1; Ascending);
     ColumnOrder2, Ascending
    )
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @babaciu75 

    Try

     

    Sort(
     Sort(
     Filter([MySP_List];
     ACCOUNT = User().Email;
     StartsWith(Column1;TextSearchBox1.Text) ||
     StartsWith(Column2;TextSearchBox1.Text) || 
     StartsWith(Column3;TextSearchBox1.Text) || 
     StartsWith(Column4;TextSearchBox1.Text)
     ); Column_order1; Ascending //If this isn't a variable, otherwise Column1;Ascending
     ); ColumnOrder2, Ascending //If this isn't a variable, otherwise Column2;Ascending
    )

     

  • babaciu75 Profile Picture
    6 on at

    Yes, I had already tried ... I think there is a power apps limit that depends on the number of lines on the SharePoint list. I tried to take another list with the same structure but with only 200 rows and everything works correctly with 2 and even more sorts nestled.

    My question is if someone is aware of this limit.

    Thank you

  • Adoe Profile Picture
    4 on at

    I have the exact same issue. My formula were Filter(Sort(DataSource;Column;Sortorder);Column = A;etc).

    It worked until the sharepoint list exceeded 8300 rows.

    I then tried Sort(Filter(...)) - but it just showed me an empty gallery.

  • Adoe Profile Picture
    4 on at

    I now solved this issue - the solution (for me, atleast) - were to Index the sorting column in Sharepoint list.
    Go to the sharepoint list - list settings - in the bottom of the columns specification there is 'Indexed columns' - create an Index for the column(s) you wish to sort in Power Apps
    When this is done, use a filter/sort like this example:

    SortByColumns( Filter(  'DataSource'; StartsWith(Title;Search.Text);Type.Value = Filter.SelectedText.Value || Filter.SelectedText.Value = "All");IndexedColumn;If(Sort.SelectedText.Value = "Ascending";SortOrder.Ascending;SortOrder.Descending))

  • babaciu75 Profile Picture
    6 on at

    Thanks for the proposed solution, to solve the problem I had chosen an appropriate criterion by concatenating 2 columns (for example date in yyyymmdd format and a numerical value indicating the status of my record) of my sharepointlist and then sorting by this field

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard