Skip to main content

Notifications

Community site session details

Community site session details

Session Id : lcjdiq2JHBwL5wcQBEqoCd
Power Apps - Building Power Apps
Unanswered

Sort and column size not working on modern table

Like (2) ShareShare
ReportReport
Posted on 21 Jun 2024 20:25:13 by 31

I have a powerapp connected to a sharepoint list with several different column types (choice, date, text, etc.). I am using the modern table control with some simple filters I built for the users. The sort feature on the columns in the table doesn't seem to be working at all. No matter which field I try on, it doesn't sort the table. Is anyone else experiencing this?

 

 

Side question - Can you lock the size of the columns in the modern table? Everytime I open my app they are 0 width.

Categories:
  • SunilPashikanti Profile Picture
    731 Super User 2025 Season 1 on 30 Jun 2024 at 15:36:05
    Re: Sort and column size not working on modern table

    Hi @Timmo1016

     

    If you’re using the legacy table, consider using other controls (like buttons) to trigger sorting actions manually.

    When using the legacy table control in Power Apps, you can create custom sorting buttons to allow users to manually trigger sorting actions. Here’s an example of how you might set this up:

     

    Create Custom Buttons:
    Add a button control (e.g., a Rectangle or Icon) to your screen.
    Set the button’s label or icon to indicate sorting (e.g., an up/down arrow).
    You can use the OnSelect property of the button to define the sorting logic.


    Sorting Logic:
    In the button’s OnSelect property, write code to sort your data source based on a specific column.
    For ascending order, you might use something like:

    Sort(MyDataSource, ColumnName, Ascending)

     

    For descending order:

    Sort(MyDataSource, ColumnName, Descending)

    Apply Sorting to the Table:
    When the user clicks the button, it triggers the sorting action.
    You’ll need to handle the sorting for each column separately by associating the button with the appropriate column.
    Visual Feedback:
    Consider changing the button’s appearance (color, opacity, etc.) to provide visual feedback when sorting is applied.

     

  • Timmo1016 Profile Picture
    31 on 27 Jun 2024 at 14:54:32
    Re: Sort and column size not working on modern table

    Thank you for your reply. I figured it was just not supported yet. You mentioned that you can sort directly from table headers with the legacy table control. Do you know how I configure that? I don't see any 'Allow Sorting' property for the legacy table control.

     

  • SunilPashikanti Profile Picture
    731 Super User 2025 Season 1 on 22 Jun 2024 at 20:14:17
    Re: Sort and column size not working on modern table

    Hi @Timmo1016 

     

    Sorting:

    • Current Status: As of now, sorting functionality isn't fully supported in the Modern Table control. You won't be able to sort directly using the column headers like you can with the classic table control.
    • Workaround with Formulas: If switching to the classic table isn't feasible, you can explore workarounds using formulas like Sort or SortByColumns within your app to achieve basic sorting functionality. However, this approach might require more coding and may not be as user-friendly as sorting directly on the headers.

    Column Size:

    • Current Status: Locking column sizes isn't currently available in the Modern Table control. Each time you open the app, the columns may readjust their width based on the content.
    • Conditional Formatting: Consider using conditional formatting to adjust column width based on certain conditions, potentially leading to a more dynamic layout. However, this requires additional configuration compared to a simple lock feature.

     

    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.

     

    Sunil Pashikanti - Tech Blog: PowerApps

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard
Loading started